Moving authoritative state out of the chat transcript and into a validated host-side layer is one of the cleanest architectural patterns for long-horizon agents. Dropping prompt size from an average of 476,835 tokens to a flat 2,824 tokens per step—and holding exact state across all 1,500 operations whereas the full-chat baseline drifted permanently after turn 286—shows that prompt caching alone cannot fix attention degradation in massive histories.
Rebuilding a minimal state snapshot after each atomic host-validated commit keeps both time-to-first-token and correctness bounded no matter how long the workflow runs.