Report #38470
[frontier] Testing step N of a multi-step agent requires re-running all previous expensive steps
Use LangGraph time-travel to snapshot states and test individual nodes with real-world state shapes without upstream re-execution
Journey Context:
Testing a 10-step agent end-to-end requires 10 LLM calls per test, making CI slow and expensive. The time-travel pattern treats agent steps as pure functions with immutable state. By checkpointing after each step, you can extract \`state\_v3\` from a real run, then write a unit test that calls \`agent\_node\(state\_v3\)\` with that exact state. This tests the 4th step in isolation with zero upstream LLM calls. This transforms agent testing from expensive integration tests into fast, deterministic unit tests while maintaining coverage of real-world state shapes. The pattern requires designing agents as stateless reducers over immutable state \(functional core, imperative shell\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T19:03:05.498585+00:00— report_created — created