You have a context plane. You have a harness. The agent still issued a refund it was not authorized to make.
Compliance asks a simple question: which rule, skill, tool, and context version produced this?
Nobody can answer. There is a chat log. There is a model name. There is a ticket in the queue. There is no run.
The failure is no longer “the model hallucinated.” The failure is that you cannot reconstruct the decision path. You cannot replay it. You cannot score it. You cannot revoke the right thing. You have an incident with a narrative attached—not evidence.
If context engineering answers what the agent is allowed to know, and the agent harness answers what the agent is allowed to do, the agent trace answers can we prove it—and contain it when we cannot?
That is the missing layer. Identity, context, and harness without traces are architecture you cannot defend in a board, an audit, or a 2:00 AM rollback.
Why chat logs are not observability
Most teams treat the conversation as the system of record:
user said X → model said Y → we shipped Y
That is a transcript. Transcripts are useful for UX debugging. They are useless for governance.
A transcript does not tell you:
- Which principal acted—human, service, or agent instance—and with which credentials.
- Which context contract was assembled: sources, versions, redactions, permission filters.
- Which rules resolved (
global + role + tenant + task) and which were silently dropped because the prompt window overflowed. - Which skill loaded—and whether a stale
refund-processing-v1ran instead ofv2. - Which tool calls were proposed, which the broker rejected, which a human approved, which actually mutated state.
- Which model and prompt package ran, so you can tell a reasoning change from a policy change.
When the only artifact is prose, every post-mortem becomes literary criticism. Auditors do not accept literary criticism.
The durable artifact is not the chat. It is a versioned execution trace.
The stack, completed
These are complementary layers, not competing essays:
| Concern | Identity & Trust | Context Engineering | Agent Harness | Agent Trace |
|---|---|---|---|---|
| Primary question | Who is acting, for whom? | What may the agent see? | What may the agent do? | Can we reconstruct the run? |
| Core artifact | Credentials, wallets, issuers | Context contract | Rule + skill + tool registry | Canonical trace + replay bundle |
| Failure mode | Spoofed or over-scoped principals | Wrong or leaked data in the prompt | Unauthorized or ungoverned action | Unexplainable incidents; unevaluable systems |
| Platform owner | IAM / digital trust | Data / context plane | Agent platform / integrations | Observability + eval + incident |
| Eval focus | Credential validity, delegation scope | Retrieval precision, permission boundaries | Rule application, tool authorization, loop integrity | Completeness, replay fidelity, eval coverage |
You need all four. Identity without traces cannot attribute. Context without traces cannot explain hallucinations. A harness without traces cannot prove the broker actually ran. Traces without the other three are logs of a system that was never governed.
A canonical trace schema
Do not invent a new logging religion per product team. Define one run record every agent must emit—support, coding, claims, marketing, ops.
At minimum, every completed or aborted loop writes:
| Field | What it captures | Why it exists |
|---|---|---|
| Run id / correlation id | One id across planner, retrieval, model, broker, approvals | You cannot join four systems after the fact. |
| Principal | Human, agent instance, tenant, session | Agents are first-class IAM subjects, not a shared service account. |
| Credentials presented | Issuer, schema, expiry, delegation scope | Ties the run to the trust fabric—not to “the bot user.” |
| Intent + skill | Classified intent; skill id and version | Stale playbooks are defects, not folklore. |
| Rules resolved | Rule ids, versions, merge order, deny/allow | “It was in the system prompt” is not evidence. |
| Context contract | Sources, document versions, redactions, token budget decisions | Reconstruct what the model was allowed to see. |
| Model identity | Provider, model, decoding params, prompt/package hash | Separate model drift from policy drift. |
| Tool proposals vs executions | Schema, arguments, broker allow/deny, retries | The gap between “the model wanted” and “the system did.” |
| Approvals | Who, what, when, which policy required it | Maker-checker is theater without this row. |
| Side effects | Systems mutated, identifiers, compensating actions | Blast radius starts here. |
| Guardrail results | Pre-flight and post-flight checks | Failures that did not block still need a record. |
| Terminal state | Completed, escalated, timed out, killed | Incomplete runs are first-class, not missing data. |
If a field cannot be reconstructed, treat the run as non-compliant by default—the same way you would treat an unsigned payment.
Store traces as append-only, tamper-evident records with retention that matches your regulatory clock, not your log-shipping discount tier. Chat UIs can summarize traces. They must not be the store.
Replay is the test; logs are the rumor
Observability that cannot replay is commentary.
Replay means: given the same principal, the same credential versions, the same context bundle, the same rule/skill/tool versions, and the same model package, you can re-drive the loop and get the same decision path—allow, deny, escalate—even if the model’s prose differs.
That distinction matters:
- Prose replay is a fool’s errand. Sampling will always wander.
- Control-plane replay is the requirement. Did the broker allow
issue_refund? Did rulerefund-cap-v3fire? Wasget_accountauthorized for this tenant?
Build replay in two modes:
- Offline eval: fixture traces from production (redacted) become CI cases. A harness change that skips an approval gate fails the build.
- Incident replay: freeze versions at the moment of failure. Do not debug against today’s prompts and yesterday’s data.
If you cannot replay, you cannot tell a policy bug from a retrieval bug from a model regression. You will “fix the prompt” forever.
The eval plane: score the run, not the essay
Most AI eval suites still score final answers: helpfulness, tone, factual accuracy. That is downstream of the real failure point—and it is the vanity metric of the agentic era, the cousin of lines of code and MQLs.
Add an eval plane that scores traces:
Identity evals
- Did this agent instance present a live, correctly scoped credential?
- Was delegation within the owner’s limits?
Context evals
- Given this user and task, did we retrieve the authoritative policy?
- Did we exclude deprecated content and out-of-scope fields?
- Would a reviewer call this the minimum sufficient bundle?
Harness evals
- Were the correct rules applied?
- Was the right skill loaded—and only the right skill?
- Were tool calls authorized for this principal?
- Did side-effecting actions pass the approval gateway?
Trace evals (the ones almost nobody writes)
- Is the trace complete? Missing tool rows are a production defect.
- Is it joinable? Can an auditor walk principal → context → rule → tool → side effect with one id?
- Is it replayable? Do frozen versions reproduce the control decisions?
- Would an auditor agree this execution is compliant—without reading the chat?
When output evals fail, you may have a model problem. When trace evals fail, you have a platform problem. Fix the runtime—not the wording of the assistant’s last sentence.
Run these evals in CI for skills and rules, and as production monitors on sampled live traffic. A skill that only passes in a notebook is not a skill. It is a demo.
Incident response for agents
When a coding agent merges incomprehensible code, you get AI Legacy Debt. When a production agent takes an incomprehensible action, you get something worse: a market, customer, or regulatory event with no rollback map.
Treat agent incidents as first-class operations, not chatbot tickets.
A minimum playbook:
- Kill — stop the agent instance and any in-flight loop. A kill switch that only closes the UI tab is not a kill switch.
- Freeze — pin the trace, context versions, rule/skill/tool versions, and model package. Do not “rotate the prompt” before you snapshot.
- Attribute — principal, credentials, tenant, and human approver if any. If attribution fails, revoke broadly and admit the identity layer is the incident.
- Contain — reverse or compensate side effects from the trace’s mutation list. If the mutation list is empty, you are guessing.
- Revoke — credentials, skills, or tool grants that made the action possible. Rolling back a model is not the same as rolling back authority.
- Eval — add a failing trace fixture to CI before you declare the issue closed.
Blast radius is a trace query, not a Slack poll: every run that used refund-processing-v1 after the bad config, every tenant whose agent presented the leaked key, every publish that used an expired claim.
If you cannot answer those queries in minutes, you do not have an agent platform. You have a chatbot with API keys.
Five design principles for CTOs
1. The trace is the product artifact; the chat is a view
Product and platform teams should treat the run record the way they treat a ledger line or an audit event in payments. The UI may render a conversation. Governance reads the trace.
2. If it is not versioned, it is not in the trace
Rules, skills, tools, context documents, prompt packages, and models all need versions in the record. “We used GPT” is not provenance.
3. Completeness is a SLO, not a nice-to-have
A 99.9% uptime agent that emits traces 60% of the time is ungovernable. Measure trace completeness beside latency. Incomplete runs fail the SLO.
4. Enforce first, explain always
The harness still blocks unauthorized tools. The trace does not replace the broker. It makes the broker accountable. Hope in the prompt is still hope.
5. Redact in the store; do not omit the structure
PII and secrets must not live in cleartext logs. Redaction is not an excuse to drop tool names, rule ids, or side-effect pointers. A hole in the graph is how incidents become folklore.
Strategic implications for technology leaders
For platform teams: The eval and trace plane is the next shared bet after the context plane and the harness. Whoever owns reconstructability owns the quality ceiling you can actually prove.
For security and compliance: This is where “the agent did it” stops being a shrug. Invest in tamper-evident traces and joinable identity before you expand autonomy. Audit wants a path, not a paragraph.
For product leaders: User trust in agentic products correlates with predictable, explainable action—not with a longer chat. “We can show you exactly what happened” is a commercial claim. It is also an architecture.
For engineering orgs in the Orchestrator model: Your artifacts are no longer only code, context contracts, and skills. They are fixtures—canonical traces that define correct conduct. Review them with the same rigor you apply to API schemas.
For GTM and marketing cells: Unauthorized claims in market are side effects. If you cannot reconstruct which claims register version a publish agent used, you cannot kill the lie. The claims plane needs traces too.
A pragmatic roadmap
Phase 1 — Canonical run id and completeness (0–90 days)
- Pick the five highest-risk agent workflows (refunds, privileged access, publish, payments, data export).
- Emit one correlation id across retrieval, model, broker, and approvals—even if the payload is ugly.
- Inventory what you cannot reconstruct today. That list is the backlog.
- Stop treating application logs and chat exports as the audit trail.
Phase 2 — Schema, identity join, and CI fixtures (3–6 months)
- Standardize the trace schema above. Reject runs that cannot fill required fields.
- Join traces to agent credentials and human approvers.
- Convert last quarter’s incidents into replay fixtures. Gate skill and rule changes on harness/trace evals—not on “the demo still sounds good.”
- Define trace-completeness SLOs.
Phase 3 — Replay and incident command (6–12 months)
- Offline replay of control decisions against frozen versions.
- Kill, freeze, contain, revoke playbooks wired to the mutation list.
- Production sampling of identity, context, harness, and trace evals.
- Retention and legal hold that match the journeys you automated.
Phase 4 — Shared proof plane (12–18 months)
- One trace fabric consumed by support, engineering, GTM, and partner agents.
- Auditor-facing reconstruction without engineering archaeology.
- Cross-agent traces: when a meta-harness coordinates specialists, the parent run id is the product.
The uncomfortable truth
The model wars are commoditizing. The harness war decides who can act. The trace war decides who can stay in production after the first serious mistake.
Companies that score chat answers and ship agents on RAG plus a prompt will keep discovering their governance story in the incident channel—one unauthorized action at a time.
Companies that treat the versioned execution trace as core infrastructure will ship agents that are not only bounded, but reconstructable: you can eval them, replay them, revoke them, and explain them.
You cannot govern what you cannot reconstruct. Context determines what your agents know. The harness determines what they can do. The trace determines whether you will still be allowed to run them after something goes wrong.
If an agent took an unauthorized action this morning, could you reconstruct the credential, context bundle, rule, skill, and tool versions—or would you be reading a chat log? Are you evaluating final answers, or evaluating whether the run was complete, authorized, and replayable?
Frequently Asked Questions
What is an agent trace in enterprise AI?
An agent trace is a versioned, reconstructable record of a run: who the principal was, which credentials were presented, what context was assembled, which rules and skills applied, which tools executed, and which human gates fired—not a chat transcript.
How does the agent trace relate to context engineering and the agent harness?
Context engineering governs what an agent may see. The harness governs what it may do. The trace is how you prove both after the fact—and how you eval, replay, and contain a run when something goes wrong.
Why aren't LLM output evals enough to govern agents?
Scoring the final answer measures fluency, not authorization. An agent can produce a helpful reply while using expired context, skipping a rule, calling an unauthorized tool, or bypassing an approval gate. Those failures only show up in the trace.
What should be in a canonical agent trace schema?
Identity of the human, agent, and tenant; credential and policy versions; the context contract and source provenance; rules, skills, and tools with versions; model identity; pre/post guardrail results; approvals; side effects; and a correlation id that ties the loop together.