Overview
Fix a Bug provides a structured three-phase workflow: investigate the issue, design a solution, then implement the fix. Each phase produces artifacts so you can track progress and review the approach before code changes land.When to Use
- Regressions and failing tests
- Production incidents
- Any work focused on restoring existing behavior
- When you need to document root cause and impact
How It Works
1
Investigation
The agent analyzes logs, stack traces, and code paths to identify the root cause. It documents findings in
investigation.md.2
Solution Design
Based on the investigation, the agent proposes a targeted fix covering edge cases. The approach is documented in
solution.md for review.3
Implementation
The agent implements the fix, runs tests, and verifies the regression is resolved. Results go into
implementation.md.Artifacts
Tips
Attach error context upfront
Attach error context upfront
Include stack traces, error screenshots, failing test output, or Sentry links in the task description. The more context the agent has during investigation, the faster it finds the root cause.
Review the investigation before proceeding
Review the investigation before proceeding
Pause after the investigation phase to verify the agent identified the correct root cause. This prevents wasted implementation effort on the wrong hypothesis.
Use for flaky tests too
Use for flaky tests too
The structured investigation flow works well for intermittent failures — the agent documents conditions under which the test fails and proposes stabilization strategies.
Related
All Workflows
Compare all available workflows
Auto
Faster path for simple fixes