Bug Mode
Investigate first. Fix second. Bug mode finds root causes before touching any code.
Investigate first. Fix second.
Bug mode is designed for situations where something is wrong and you need to understand why before fixing it. The agent investigates systematically — reading logs, tracing code paths, identifying root causes — before proposing any change.
What it does
Bug mode separates investigation from remediation. The agent does a thorough read-only analysis first: it reads error messages, traces the execution path, checks related files, and forms a hypothesis about the root cause. Only after the investigation is complete does it propose a fix — and the strategy is presented before any code is modified.
When to use it
- A bug report landed and you need to find the root cause
- Something that worked before has stopped working
- An error is being thrown but the source isn't obvious
- Behavior is wrong in a way that's hard to reproduce or explain
- You've tried fixing something and the fix didn't hold
Paste the exact error message into your task description. The more precise the symptom, the faster the investigation converges on the root cause.
How it works
- Describe the bug — include the error message, what you expected vs. what happened, and any relevant context such as recent changes or environment specifics.
- Investigation phase — the agent reads files, traces code paths, and follows the error through the codebase. No files are modified at this stage.
- Root cause identified — the agent presents what it found and how the bug occurs.
- Fix strategy presented — the proposed fix is explained before any code is touched.
- Fix applied — the change is made in an isolated branch and verified.
Key features
- Investigation-first — thorough read-only analysis before any modification
- Root cause focus — doesn't just patch symptoms; finds where the problem actually originates
- Isolated branch — fixes happen in a dedicated branch so your main codebase is protected
- Live sidebar — follow the investigation step by step as it unfolds
- Auto model selection — uses the appropriate reasoning depth for complex diagnostics
Tips
Describe both the expected behavior and the actual behavior. "Expected: the form submits and redirects. Actual: the form submits but shows a blank screen." This framing helps the agent target the investigation precisely.
Include recent changes if you suspect the bug is a regression. Knowing what changed narrows the investigation scope significantly.