Skip to content

debug

The debug extension emits structured JSONL diagnostics to ~/.tallow/debug.log. Useful for inspecting tool performance, extension lifecycle, model changes, subagent activity, and errors.

Zero-cost when disabled — no file I/O, no object allocation.

Debug mode activates when any of these are true (checked once at session start):

MethodExample
--debug CLI flagtallow --debug
TALLOW_DEBUG env varTALLOW_DEBUG=1 tallow
Development modeNODE_ENV=development or running via tsx

To stream to stderr instead of a file:

Terminal window
TALLOW_DEBUG=stderr tallow

Each line in the log is a self-contained JSON object:

{"ts":"2026-02-11T12:00:00.000Z","cat":"session","evt":"start","data":{"cwd":"/dev/project","sessionId":"abc","model":"anthropic/claude-sonnet-4"}}
{"ts":"2026-02-11T12:00:01.200Z","cat":"tool","evt":"call","data":{"toolCallId":"tc_1","name":"bash","args":{"command":"ls"}}}
{"ts":"2026-02-11T12:00:01.850Z","cat":"tool","evt":"result","data":{"toolCallId":"tc_1","name":"bash","durationMs":650,"ok":true,"contentLength":245}}
CategoryEvents logged
sessionstart, shutdown (with duration and totals), hooks_merge
toolcall (name, args), result (name, duration ms, success/failure, content length)
turnstart/end with turn index and tool result count
agentbefore_start (prompt size, estimated tokens), end (message count)
modelselect (provider, model ID, previous model, source)
subagentstart/stop (agent type, task, exit code)
erroruncaught_exception, unhandled_rejection (with full stack traces)

Sensitive-looking fields are automatically redacted before persistence.

  • Key matching is case-insensitive and pattern-based (token, key, secret, authorization, cookie, password, etc.)
  • Redaction is recursive for nested objects and arrays
  • Redaction runs before string truncation to avoid partial secret leakage

String values longer than 500 characters are automatically truncated.

Manage debug mode from within a session:

CommandDescription
/diagnosticsShow local tail; when wezterm_pane is available, choose local tail or live follow in a new pane
/diagnostics-onEnable debug mode mid-session
/diagnostics-offDisable debug mode mid-session
/diagnostics-clearTruncate the log file
/diagnostics-tail [n]Show last N log entries (default: 20)

These are related, but not the same tool:

  • Diagnostics (/diagnostics*) are the raw event stream (JSONL logs).
  • Debugger (/debug) is model-assisted analysis on top of those logs.

Think of it like this:

  • Diagnostics = the flight recorder (what happened, exactly when).
  • /debug = the investigator (what pattern likely explains it).

Use diagnostics when you need concrete evidence:

  • verify whether an event happened
  • inspect exact timing and ordering
  • tail live output while reproducing an issue

Use /debug when you need interpretation:

  • summarize large logs quickly
  • cluster recurring errors
  • identify likely bottlenecks and next checks

Typical workflow: enable diagnostics, reproduce the issue, then run /debug for guided analysis.

Terminal window
tallow --debug -p "Refactor the auth module"
# After the session:
cat ~/.tallow/debug.log | jq 'select(.cat == "tool" and .evt == "result")' | jq '{name: .data.name, ms: .data.durationMs}'
Terminal window
tail -f ~/.tallow/debug.log | jq .
Terminal window
cat ~/.tallow/debug.log | jq 'select(.cat == "error")'