Bug investigation
Chase a bug from symptom to fix with the agent doing the legwork.
A bug report rarely arrives with a stack trace attached. This guide shows how to hand Mel a vague symptom and get back a reproduction, a root cause with file and line references, and a fix you approved — with every step recorded as a navigable block.
1. Describe the symptom
Press ctrl+enter in the prompt (anything you've already typed carries over as the first message) to start an agent conversation. Describe what's wrong in plain English. A prompt that works well:
One of the tests is failing. Run the test suite to reproduce the exact
failure, read the failing test and the code under test, and trace the root
cause — do not guess. Explain the cause with file/line references, then
propose the minimal fix and wait for my approval before editing.The two instructions that matter: reproduce first and wait for approval. They keep the agent honest — it has to show you the failure before it touches anything.
2. Watch it reproduce
The agent works with real tools, and each one shows up as a card in the transcript:
run_commandexecutes your test suite or script and reads the full output.grepandfind_fileslocate the code that produced the error.read_filepulls in the failing test and the code under test.
Commands the agent runs need your go-ahead the first time — Allow, Always allow for the rest of the conversation, or Deny. See Tools & approvals.
3. Dig through the output yourself
You're not a spectator. Any command's output — in the conversation or in the plain terminal — is a block you can work with:
- Select a block and open its filter bar to search the output live, with regex (
.*) and case-sensitive (Aa) modes and highlighted matches. This works on streaming output too, so you can filter a long test run while it's still printing. - File paths in output are links: ctrl+click one to open it. In the code review panel or editor, ctrl+click on an identifier jumps to its definition via the language server.
If the bug lives on a remote machine, ssh in and press ctrl+enter — the agent's read, grep, and run tools then execute on that host. See SSH & remote sessions and the incident response guide.
4. Approve the fix
Once the agent has the cause pinned, it proposes the minimal edit. Every applied change appears as a diff card — the path, +A −D counts, and red/green rows — so you see exactly what changed, in context, before moving on.
5. Verify
Ask the agent to re-run the failing test (or it will offer to — verify-after-change is built into how it works). The passing run lands as one more block in the transcript. When you're done, esc collapses the conversation into your scrollback; ctrl+shift+Y resumes it later, and the whole investigation — commands, output, diffs — is saved under your conversation history, ready to paste into the ticket.