This loop automatically detects and resolves memory leaks in your application through iterative profiling and code fixes. It runs memory profiling tools, analyzes output to identify leak sources, proposes targeted changes, and validates fixes until memory usage stabilizes.
Remove memory leaks
Initiate the Memory Leak Hunter loop to systematically detect and fix memory leaks in your codebase.
Start the Loop
Run the kickoff prompt to begin the memory leak detection process.
Review Proposed Changes
Examine each suggested fix before applying to ensure correctness and compatibility.
Monitor Progress
Track memory improvements across iterations until the exit condition is met.
Profile Memory Usage
Execute memory profiling tools to capture current memory allocation state and identify potential leak candidates.
Analyze Profiling Output
Examine profiling results to pinpoint exact code locations causing memory leaks, focusing on unclosed resources and unreleased references.
Propose Targeted Fix
Generate specific code modifications to address identified leaks while maintaining existing functionality.
Debugging
This loop guides you through reproducing a reported bug, identifying its root cause, implementing a fix, and verifying the solution through automated testing. The agent will iteratively work to resolve the issue while maintaining system integrity.
Debugging
This loop analyzes application error logs to identify and fix recurring errors, reducing their frequency over time through iterative debugging and targeted code improvements.
Debugging
A coding agent loop designed to diagnose and resolve production incidents through iterative investigation, targeted fixes, and continuous health monitoring until system stability is restored.
Apply Fix and Verify
Implement approved changes and re-run profiling to validate memory improvement.
Evaluate Exit Condition
Check if memory usage has stabilized; if not, repeat cycle or exit after max iterations.
Start the "Memory Leak Hunter" loop. Goal: Remove memory leaks Max iterations: 10 Between iterations run: memory profiling Exit when: Memory usage stable Start the Memory Leak Hunter loop. First, run memory profiling on the current codebase to identify any potential memory leaks. Analyze the output and propose specific fixes. Continue iterating until memory usage stabilizes or we reach maximum iterations. Self-pace this loop. After each iteration, run `memory profiling` and evaluate the output, and only continue if the exit condition is not met (Memory usage stable). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.