Error Log Reduction
This loop analyzes application error logs to identify and fix recurring errors, reducing their frequency over time through iterative debugging and targeted code improvements.
Goal
Reduce recurring errors detected in application logs to meet a target threshold
How to Run
Run this loop in your coding agent to systematically identify, prioritize, and resolve recurring errors in application logs until reaching the desired error count target.
- 01
Initialize Loop
Provide the target error count and log file location to begin
- 02
Analyze Logs
Agent examines recent error logs to identify patterns and recurring issues
- 03
Fix Errors
Agent creates and implements fixes for identified recurring errors
- 04
Verify Progress
Agent re-runs log analysis to check if error count meets target
Workflow Steps
- 01
Initialize loop by receiving user input (target error count, log source)
- 02
Execute check command to analyze current error logs
- 03
If exit condition met, terminate loop successfully
- 04
Identify top recurring error patterns from analysis results
- 05
Create targeted fix plan prioritizing most frequent errors
- 06
Implement code changes to address each recurring error
- 07
Test fixes against error reproduction scenarios
- 08
Return to step 2 for next iteration if target not yet met
Kickoff Prompt
Start the "Error Log Reduction" loop. Goal: Reduce recurring errors detected in application logs to meet a target threshold Max iterations: 10 Between iterations run: analyze-error-logs Exit when: error_count <= target_error_count I want to reduce recurring errors in my application. Please analyze the error logs to identify patterns and fix the most common issues. What is your target error count and where should I find the log files to analyze? Self-pace this loop. After each iteration, run `analyze-error-logs` and evaluate the output, and only continue if the exit condition is not met (error_count <= target_error_count). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.
Guardrails
hardcoded- ·Only modify code related to identified recurring errors
- ·Do not delete error handling logic without understanding its purpose
- ·Ensure all fixes are tested with relevant error scenarios before proceeding
- ·Maintain original functionality while addressing error causes
- ·Document each fix with comments explaining the error pattern resolved
Flow Diagram
Related loops — Debugging
Debugging
Reproduce and Fix
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
Production Incident Resolver
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.
Debugging
Root Cause Finder
A systematic loop for identifying the root cause of code issues, bugs, or unexpected behavior through iterative investigation and analysis, ensuring developers address foundational problems rather than surface-level symptoms.