Governing compaction & deployment.
A first-principles account of how durable state, fail-closed transitions, version direction, and executable documentation keep long-running agentic systems recoverable.
Why compaction becomes control flow
The policy follows from four axioms. It does not assume that an agent can reliably judge its own remaining context or reconstruct detail after it has been compressed.
1 · Context is finite
Long-running work eventually exceeds the active reasoning window, even when the task itself is healthy.
2 · Compression is lossy
A summary can preserve intent while dropping exact constraints, provenance, or the state of an in-flight step.
3 · The host observes the boundary
The environment, not the agent's confidence, is the authoritative observer of a confirmed compaction event.
4 · Continuity must be durable
Anchors, evidence, and the next safe task must survive outside conversational memory, with one successor per boundary.
Six verdicts, one direction
Every deployment compares the running version, the requested version, and the freshly observed published tip. The result is a finite verdict, never a best guess.
How an outdated scheduled task overwrote a newer runtime
The lesson was not “be more careful.” It was to remove the unsafe transition from the system and make unattended automation read-only.
Layer 1 · Version guard
Every transition compares versions and accepts only a current no-op, a verified forward move, or a separately approved rollback.
Layer 2 · Recoverable backups
Files displaced by a deployment are retained, so recovery does not depend on recreating the previous runtime from memory.
Layer 3 · Report-only automation
Scheduled checks may observe and report drift. They cannot repair, synchronize, publish, or change the live environment.
Operational boundary
A human remains responsible for publishing, approving a rollback, restoring state, and accepting post-deployment evidence.
The Guard failed on every call for 100 days
From 2026-08-18 to 2026-11-26 the write Guard on the reference machine blocked nothing. Every test was green and every public page said it was enforcing.
What happened
On 2026-08-17 the Guard was simplified from 798 lines to 348. The change dropped one line, from __future__ import annotations. The hook was registered to run under the system Python, version 3.9.6, which cannot read the newer type syntax without that line. From the promotion on 2026-08-18 the Guard raised an error while loading, on every call. The host treats a hook that crashes as a hook that allows.
Why the tests missed it
The test suite ran the hook under Python 3.12, where the file loads. No test used the interpreter the host was registered to use. The 18/18 host probes dated from 2026-08-10, before the simplification, and were not repeated. When a new host version was accepted in October, only the version allowlist changed.
Why nobody noticed
A Guard that allows and a Guard that never ran look the same from outside: the tool call succeeds. The Guard wrote no record of being called. The status command read a hook file that by then belonged to another application and reported the Guard as present. It was found on 2026-11-25, when an agent session created a file inside the harness installation and nothing stopped it.
What changed
The Guard now writes a receipt on every call, with its own file hash and counts of calls and blocks. A test runs each hook under the registered interpreter. A Guard that raises now blocks writes and deletes. Each function has a side-effect-free probe per host, recorded in a conformance table, and a new host version makes the receipts stale.
Policy text is protected by contract tests
When prose governs behavior, wording, links, and cross-language alignment become interfaces. A casual edit can be a policy regression even when the page still looks correct.
Lock the public contract
- Required status markers and truth-boundary phrases remain literal.
- Canonical links stay language-specific and reachable.
- Paired pages keep the same structural coverage.
- A rendered specification retains the source document's heading set.
Test behavior, not decoration
Contract tests protect the policy surface that readers and automation rely on. Visual checks separately cover dark mode, mobile layout, and diagram overflow. Together they make documentation executable without turning prose into an implementation detail.