/trace — Investigation and Root Cause Analysis
Investigate unknown failures. Dispatch a trace subagent to reproduce, trace, and isolate root cause — then hand the report to/fix.
When to Use
- A failure exists but the cause is unknown
- Stack traces or error messages don’t point to an obvious defect
- Multiple files or systems may be involved
/reviewencounters a failure with unclear root cause
Flow
- Collect symptoms — gather error messages, stack traces, logs, and expected vs actual behavior.
- Dispatch tracer — the spawned agent performs a read-only inline investigation.
- Investigate — the tracer autonomously reproduces, hypothesizes, traces, and isolates root cause.
- Signal findings — tracer reports back to the leader via
genie send. - Receive report — structured diagnosis.
- Hand off — pass the report to
/fixor escalate.
Report Format
Dispatch
Trace runs in isolation — the subagent must not modify any source files.Task Lifecycle Integration
When a PG task exists for the work being investigated, findings are logged as task comments:| Event | Command |
|---|---|
| Investigation start | genie task comment #<seq> "Trace: investigating — [symptom summary]" |
| Root cause found | genie task comment #<seq> "Root cause: [summary] — [file:line]" |
| Multiple causes | genie task comment #<seq> "Root causes: [count] identified — see trace report" |
| Investigation failed | genie task comment #<seq> "Trace: could not determine root cause — [reason]" |
Rules
- Never fix during trace — investigation only, always separate from correction
- Always reproduce before theorizing
- Evidence required — every root cause claim must include file paths, line numbers, and a causal chain
- Hand off to
/fix— trace produces a report,/fixapplies the correction - If root cause spans multiple systems, report each separately with confidence levels