Reading traces
trace.sh reads a cortex trace. Six views, each one jq filter.
./trace.sh <view> <trace.jsonl> [arg]Views
timeline
One line per thing that happened, with just enough payload to see the shape of a run. Streaming token noise is dropped — it's the same text the assistant_end line carries in full. Great for getting the overall shape of a run at a glance.
./trace.sh timeline runs/report-final/trace.jsonlprompt
Every message of one model call, exactly as the provider saw it. Defaults to the last main-model request; pass a call number for a specific one, or pruner for the curator's last.
./trace.sh prompt runs/report-final/trace.jsonl # last main call
./trace.sh prompt runs/report-final/trace.jsonl 3 # call #3
./trace.sh prompt runs/report-final/trace.jsonl pruner # the pruner's last callsystem
The system message alone — the prompt under test, plus whatever axon appends (including the tool catalog). This is the view for prompt engineering: it shows the composed system prompt the model actually received.
./trace.sh system runs/report-final/trace.jsonltools
What the agent actually did, in order, with full arguments and a clipped result. This is the view that shows a wrong approach fastest.
./trace.sh tools runs/report-final/trace.jsonlusage
Token spend per call and in total. Reported by the provider, not estimated.
./trace.sh usage runs/report-final/trace.jsonlerrors
Every error, tool error and wire error, with timestamps.
./trace.sh errors runs/report-final/trace.jsonltoolsfirst to see what it did, then prompt to see what it was told. The cause is almost always something it was told, and usually somewhere more structural than the role prompt.