Skip to content

straitjacket

Your coding agent can read the whole test log, the whole build output, the whole repository — and still have room left to think. You stop paying for the same bytes every turn, and the one line that mattered is still there an hour later.
302,628 → 521visible tokens; quiet needle retained
L14,238the quiet line truncation lost
1,454addresses followed after content moved
0 wrongacross 1,920 anchored resolutions
Three measured treatments of the same 20,001-line log: raw output floods context; head-and-tail truncation loses the quiet needle; straitjacket preserves it in a bounded digest with an exact retrieval address.Three measured treatments of the same 20,001-line log: raw output floods context; head-and-tail truncation loses the quiet needle; straitjacket preserves it in a bounded digest with an exact retrieval address.
  • Your agent stops going blind halfway through It can run the noisy suite, tail the long build and sweep the big repository without spending its whole window on the output. The room it needs to reason is still there on turn twenty.

  • You stop re-paying for the same bytes every turn In the field-needle receipt, 302,628 raw tokens become 521 visible tokens. The digest stays bounded however loud the command was. Charged once — not on every round for the rest of the session.

  • Nothing you needed vanishes quietly Every byte left out of the summary keeps an exact address. The failing assertion, the one anomalous line, the stack frame three screens down — all still retrievable long after compaction would have dropped them.

  • You can check what the agent tells you Frozen artifact handles resolve exact stored bytes while the store is available. Live repository anchors verify, relocate, or refuse instead of silently returning whatever moved under an old line number.

  • Small work is allowed to stay small Containment is conditional. A proven-small named test can stay native; the output gate remains armed if that same command unexpectedly floods.

  • It works with the agent you already use Antigravity, Claude Code and Codex. One command, merged into your existing config, never clobbering it. You don’t change how you work.

AlphaEvolve helps straitjacket search small policy seams and find counterexamples; it never writes generated candidates into production. The benefits that survived review are deliberately reported by evidence class.

Small work stays small

One named-test path is 20.15% faster locally and emits 46.67% fewer result bytes than always capturing. If it unexpectedly floods, the output still receives 48.15x addressable containment.

Repeat setup becomes a verified no-op

After one doctor-verified setup, an unchanged repeat is 4.42x faster, emits 8.17x less output, and rewrites no host configuration. Drift or a version change returns to full repair and verification.

More commands, same authority boundary

The guard now distinguishes bounded direct work, noisy read capture, and commands that still need review. 57,313 deterministic cases pass, and a compound-command counterexample closed an unsafe rewrite path.

Parallelism has executable gates

A 269,696-case matrix protects orchestration policy. Opt-in disjoint Git worktrees later measured a scoped 1.68x local speedup; overlapping or dirty writes still serialize.

AlphaEvolve also saved us from shipping losses: direct naive was 8.55% cheaper on one already-small routed task, and managed orchestration search found 0% incremental gain over reviewed seeds. Both candidates were rejected. Read the full benefit ledger and its measured/modeled boundaries.

The measured field-needle log puts 302,628 tokens into an uncontained transcript. You don’t pay for that once — every turn afterwards re-sends it. A routine mcp__github__list_commits costs about 19,800 tokens per round, forever.

Then the window fills, compaction runs, and it silently deletes the one failing line you needed. No warning. No trace it was ever there. You find out when the agent confidently tells you something it can no longer check.

That’s the tax: you pay more, the agent gets dumber, and the evidence you needed is the first thing thrown overboard.

Illustrative seven-turn residency trace: native execution keeps a 302,628-token payload resident for six turns, while containment keeps a 521-token digest and retrieves one bounded region only when needed.Illustrative seven-turn residency trace: native execution keeps a 302,628-token payload resident for six turns, while containment keeps a 521-token digest and retrieves one bounded region only when needed.

Context is not just a cost line — it’s the agent’s working memory. A window full of last hour’s log is a window that can’t hold your problem. Every token you spend re-reading pytest output is a token not spent on the bug.

The residency trace is an accounting model, not a task-outcome claim. Agent outcomes are measured separately, including the regimes where native execution wins.

Nothing here is claimed without a receipt. Every steering change ships only after a measured A/B or head-to-head, and all of it is published in evals/. House rule: receipts before doctrine.

Everyone in this space is solving the same tax. The question is what they charge you for it.

Instead of…What it costs youWhat you get here
Letting the window fillyou pay for every byte, every turn, and quality falls as it fillsthe log is charged once, at a fixed small size
Compaction / summarizationrewrites your history and throws evidence away permanently — you can’t get it backclearing is lossless: the evidence is secured first, then the window is freed
RAG / vector memoryprobabilistic recall with no provenance — you can’t tell if it’s realfrozen handles resolve exact stored bytes; live repository anchors verify, relocate, or refuse
Rewriting wire proxies (Headroom)silent evidence drops — in our head-to-head, 347,595 tokens became 68 with no traceevery elided byte stays on disk and addressed; 96.5–98.1% cache hit vs their 80.6–84.2%
Bash-hook filters (rtk)lossy on the paths that succeeded; no way to go back and lookbudgets that spend bytes on failures and starve success noise
Terse-prompting styles (Caveman)destroys evidence to save tokens — the quiet-needle problemcite instead of quote, with a handle that resolves

We benchmarked or stress-tested each of these, kept the good idea, and recorded what each still does better than us. That last part matters and is written down: Headroom’s zero-integration generality, rtk’s 15-host reach and sub-10ms binary, and more, in Comparisons — including the two places the field currently beats us outright, which are install friction and how easily you can extend this thing without forking it.

Everything here works the same way: start on the cheapest rung, and escalate only when the work actually demands it. Read a small file natively; capture a noisy one. Spend a small budget on output that succeeded; spend more on output that failed. Nudge an agent that is drifting; substitute only when nudging stopped working.

The nine ladders of efficiency: solution, capture, emission budgets, graduated engagement, window pressure, guard modes, policy epochs, deployment tiers and model tiers. Each row shows its rungs left to right, who climbs it, and whether its traversal is measured.The nine ladders of efficiency: solution, capture, emission budgets, graduated engagement, window pressure, guard modes, policy epochs, deployment tiers and model tiers. Each row shows its rungs left to right, who climbs it, and whether its traversal is measured.

The right-hand column is the honest part, and it is why this is published as an audit rather than a feature list. It is derived, not asserted: a ladder counts as measured only when it declares a signal naming a ledger that really carries rung values, and one that cannot be scored has to say why. Six of nine qualify today.

ctx ladders runs it against your own repository, and the rungs are configurable — [ladders.capture] rungs = [...] narrows a ladder you never want climbed. What each unmeasured one would need is written down in Ladders.

The two surfaces your agent actually touches

Section titled “The two surfaces your agent actually touches”

Everything above is the argument. These are the parts you install.

The comprehensive servers in this space ship 40+ separate MCP tools. Every tool definition is prompt prefix — re-sent on every single request, and invalidated whenever the server adds a tool. We expose exactly one tool with an operation parameter, so the prefix never churns. That is upstream of the 96.5–98.1% cache-hit number at the top of this page.

It is bounded by construction, not by convention:

  • The token ceiling is declared in the published schema and clamped at runtime. An advertised bound that nothing enforces is worse than no bound.
  • There is no execution surface. Running commands stays on your host’s own command tool, so your permission prompts still appear — a retrieval server that can quietly run things is not a retrieval server.
  • A bad reference is a typed error, never a silent empty result that reads like “nothing found”.

The honest cost: one tool with an op parameter is less obvious than forty named ones, to a model and to you. We think prefix stability is worth more, and the cache numbers are the argument.

A skill that stays small until you need it

Section titled “A skill that stays small until you need it”

The skill is the advisory layer — it teaches the protocol, and unlike the hook it can be ignored. It is written to be cheap at rest: a short always-loaded protocol, with six reference documents that load only when a task reaches for them. Same discipline we apply to your tool output, applied to our own instructions.

Its rules are numbered and checkable, which is the point: an observed behaviour can be scored, challenged, and removed when a larger receipt overturns an early result.

Advisory means bypassable. That is the honest boundary of this layer, and it is why the hook exists: the hook enforces at the tool boundary what the skill can only recommend.

A treemap of the field: Headroom, rtk, Caveman, Compaction, RAG/vectors, Ponytail, Maki and wozcode. Each tile names the tool's one good idea, its limitation, and — on an amber strip — the lossless form straitjacket adopted.A treemap of the field: Headroom, rtk, Caveman, Compaction, RAG/vectors, Ponytail, Maki and wozcode. Each tile names the tool's one good idea, its limitation, and — on an amber strip — the lossless form straitjacket adopted.
Terminal window
python -m pip install --upgrade ctx-harness # Python 3.11+
cd your-repo
ctx setup # Antigravity, Claude Code and Codex are now harnessed

Then run anything noisy through it — no agent needed to see the difference:

Terminal window
ctx run -- pytest -q

ctx setup is idempotent and non-destructive: it merges safe hook structures, never rewrites user-owned TOML, names every file it writes, verifies the hooks and bounded MCP launch contract, and exits non-zero if anything is wrong rather than claiming success.

Only once you care. Raw bytes stop at the gate and land in an immutable local store. What crosses into the transcript is an evidence index: outcome, coverage, the exceptional fact, and the exact next read.

Annotated anatomy of a receipt-derived log-template specimen: immutable run identity, outcome, template census, quiet needle, coverage receipt, and exact continuation command.Annotated anatomy of a receipt-derived log-template specimen: immutable run identity, outcome, template census, quiet needle, coverage receipt, and exact continuation command.

A token passes four points in its life, and every mechanism in the system attaches to exactly one of them: whether output can flood at birth, what crosses the wire on entry, what’s allowed to stay resident, and what the model emits back.

How it works walks one command through the whole system in plain language, in about ten minutes. If you’d rather see it applied to your situation, Use cases is organised by the failure you’re hitting, not by the feature that fixes it.