Trace every run
Status: Ready
Article ID: 008
Truth label: Limited
Audience: Agency operator
Reader outcome: Find the context, usage, verification, and outcome tied to one task attempt.
Related articles: 004, 030, 066
Target week: 02
Last verified: 2026-09-13
Technical reviewer: Codex source audit
Editorial reviewer: Codex editorial audit
A task id is not enough
One task can have several attempts. A worker can crash, a verification command can fail, QA can request rework, or an operator can revise a checkpoint. If all attempts share one undifferentiated record, it becomes hard to explain which prompt, context, model usage, or result produced the final state.
AGENTASIAN gives every claimed attempt a stable run id and an incrementing fence. Brain gives every chat turn its own turn id inside a stable conversation id.
What a task trace connects
A run trace can connect:
- task and project identity
- worker, engine, model, and attempt
- prompt manifest and private raw-artifact references
- selected repository rules, skills, session context, CPMI, and learnings
- provider usage, tokens, duration, and reported cost
- verification result and changed files
- captured diff artifact, when available
- checkpoint, grade, retry, and final outcome
The trace index stores structured lineage in SQLite. Large or sensitive prompt and provider event content remains in separate local artifact files referenced by the trace.
Start from the run id
Open the run in Cortex for normal review; it appears in the inspector column beside the list it came from, and the URL fragment carries the run id so the view can be shared. For API work, the primary Forge paths are:
GET /tasks/{task_id}/runs
GET /runs/{run_id}/trace
GET /runs/{run_id}/diff
The task route finds every attempt. The run route inspects one attempt. The diff route requests captured change text separately so a large content-bearing artifact does not ride on every task-list response.
For Brain, use the conversation or turn trace routes listed in the API reference map.
Read the record in order
- Confirm the task, run id, attempt, and fence.
- Confirm which worker and engine actually ran.
- Inspect the prompt manifest and selected context sources.
- Read verification as executed evidence, not as a promise.
- Compare changed-file paths with the captured diff.
- Read checkpoint decisions and revisions.
- Review usage and cost only when the adapter reported them.
This order prevents a common mistake: reading the final summary first and then looking only for evidence that supports it.
Why raw artifacts are separate
Prompts and provider streams can contain source code, personal context, credentials accidentally printed by a tool, or client material. They need stricter access, retention, and redaction than aggregate analytics.
Separating structured metadata from raw content makes it possible to search and summarize runs without copying every prompt into the ledger or vector store.
Current limit
The current Forge task trace outcome can include full task result and error content. Treat the trace API as content-bearing and sensitive. Raw artifact encryption, retention enforcement, and stronger role separation remain open security work. Never publish a trace response directly as an Academy example.
Next lesson
Continue with Leases, fences, and the result outbox.
Derivative map
- Weekly package: WEEK-02
- Long video: VIDEO-W02-LONG
- Shorts: SHORT-W02-PROBLEM, SHORT-W02-MECHANISM, SHORT-W02-WARNING
- Email: EMAIL-W02
- LinkedIn: LI-W02-A, LI-W02-B
- X: X-W02-A, X-W02-B
- Visual: VISUAL-W02
Review record
- Technical claims checked against the current canonical sources.
- Truth label and nearby limitations reviewed.
- Examples checked for secrets, client material, and private paths.
- Editorial structure, internal links, and repository voice reviewed.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13