Debugging

Agent is highly effective at diagnosing and fixing bugs. The most effective pattern is to give it the actual error output, not just a description of the problem.

Error-driven debugging

The fastest way to debug with Agent is to paste the full error. That means:

  • Stack traces from crash logs
  • Console output from failed tests
  • Compiler or type-checker error messages
  • Browser console errors

Agent reads the error, traces it back through your codebase, identifies the root cause, and proposes a targeted fix — not a guess.

bash
# Example: paste the full npm test output
FAIL src/auth/session.test.ts
  ● AuthSession › should refresh token after expiry
    TypeError: Cannot read properties of undefined (reading 'refreshToken')
      at AuthSession.refresh (src/auth/session.ts:42:28)
      at Object.<anonymous> (src/auth/session.test.ts:18:18)

Use @Terminals in the chat input to automatically attach the last output from your terminal. This is faster than copy-pasting.

Debugging strategies

Using terminal output

Shell Mode

Shell Mode is the most powerful debugging workflow. Enable it by typing vyre shell in your terminal. In Shell Mode:

  • Every command you run is visible to the agent.
  • When a command fails, Agent automatically reads the error and proposes a fix.
  • You can type fix this or explain this error without any copy-pasting.
Attaching terminal output manually

In the chat input, type @Terminals and select a terminal session. This attaches the last ~200 lines of output from that terminal to your message so Agent has full context.

Running tests and interpreting results

Ask Agent to run your test suite and interpret the results:

"Run npm test and fix any failing tests. Explain what each failure was and why your fix addresses the root cause."

Common patterns

Type errors

"Fix the TypeScript errors in src/api/client.ts. Don't cast to any — find the correct types."

Test failures

"The test AuthService › should validate JWT is failing. Run it, read the output, find the root cause, and fix it."

Runtime crashes

"npm start crashes with the following error. Find the bug and fix it: [paste error]"

Avoid vague bug reports

"The app is broken" gives Agent nothing to work with. Always include the exact error message, the steps to reproduce, and ideally the expected vs actual output.