Trace replay and diffing
Two runs of the same task diverge somewhere specific. Replay plus diff finds that point without re-reading thousands of tokens by hand.
What is agent trace replay and diffing?
Two runs of the same task diverge somewhere specific. Replay plus diff finds that point without re-reading thousands of tokens by hand.
Implementation
- Store enough per-step input to re-execute the deterministic parts of a run without a provider.
- Treat imported traces as untrusted input and validate them against a schema before storage.
- Diff two runs step by step and report the first divergent step, not a similarity score.
- Keep redaction applied through the replay path.
Failure modes
- Replay that calls the provider again, which changes the thing being investigated.
- Diffing on final output only, which hides where the runs split.
How it is verified
- Replay a stored run and confirm the deterministic steps reproduce exactly.
- Feed a malformed trace to the importer and confirm it is rejected.
Questions this pattern answers
What is agent trace replay and diffing?
Two runs of the same task diverge somewhere specific. Replay plus diff finds that point without re-reading thousands of tokens by hand.
How do you implement trace replay and diffing?
Store enough per-step input to re-execute the deterministic parts of a run without a provider. Treat imported traces as untrusted input and validate them against a schema before storage. Diff two runs step by step and report the first divergent step, not a similarity score. Keep redaction applied through the replay path.
How is trace replay and diffing verified?
Replay a stored run and confirm the deterministic steps reproduce exactly. Feed a malformed trace to the importer and confirm it is rejected.
What usually goes wrong with trace replay and diffing?
Replay that calls the provider again, which changes the thing being investigated. Diffing on final output only, which hides where the runs split.
Projects in this track
ClawKeeper →
Governed Claude agent control plane. A deterministic policy engine runs before every LLM call, autonomous spend defaults to zero, and the audit log is enforced by the database.
TechTide Harness Kit →
Trust contracts for agent skills expressed as JSON Schema: risk tiers, tool permissions, deny-by-default egress, approval gates, and prompt-injection fixtures behind a wall of CI validation gates.
CipherClaw →
Deterministic multi-agent debugger with zero LLM calls in the analysis path: causal graphs, weighted root-cause scoring, and failure prediction.
Swarm 357 →
357 Claude agent roles across six business layers, with portable memory, enforced cost caps, a bash policy gate, and durable checkpoints.
Related patterns
This page documents how the pattern is built. Engagement scope and pricing live on TechTide AI.
AI Production Systems at TechTide AI→© 2026 Alex Cinovoj · TechTide AI · Columbus, OH