Skip to content

Run noisy tools. Keep the evidence.

Give your coding agent a bounded result it can act on, with addresses into the complete captured output when it needs to investigate further.
Terminal window
python -m pip install --upgrade ctx-harness
ctx run -- pytest -q

Run this in a repository with tests. Python 3.11+ is required. Host integration is optional. The package is ctx-harness; the command is ctx.

A failed command remains a failed command. For a large output, the agent gets an outcome, a typed digest, and a run: address. Complete captured stdout and stderr stay in the local store.

Use the address returned by your run:

Terminal window
ctx get run:<id>#stdout --lines 120:180
ctx search run:<id>#stdout "AssertionError"

<id> is a placeholder. Large retrievals return a bounded region and a continuation. When the loop is useful, run ctx setup and ctx doctor to configure a supported coding host.

JobFirst toolResult
Investigate noisy tests, builds, or logsctx runOutcome and complete captured evidence
Locate code before reading filesctx map, ctx def, ctx refsStructural views and source coordinates
Compare two attemptsctx diffOutcome and evidence changes
Apply an observed edit and check itctx edit replace, ctx edit verifyPlan, apply receipt, and checks bound to exact bytes
Resume delegated workctx orchestrate, ctx task showAttempts, recovery, budget, and persisted task state

Capture and retrieve · Edit and verify · CLI reference

Evidence stays available after the first turn

Section titled “Evidence stays available after the first turn”

Typed profiles extract failed test identities, diagnostic locations, unusual log events, and JSON structure. A deterministic renderer fits those facts into a budget and declares what it omitted. There is no model call in this path.

Stored handles identify immutable bytes while retained. Anchored repository reads verify the observed span, relocate unchanged content, or refuse stale coordinates. Model-visible retrieval follows the current redaction policy.

Follow the data path.

Evidence for the mechanism, and for the trade-off

Section titled “Evidence for the mechanism, and for the trade-off”
MeasurementFindingWhat it establishes
Deterministic field-needle fixture302,628 input tokens became 531 output tokens; the quiet target at line 14,238 and a retrieval address remainedBounded evidence delivery on that fixture
Small live canary, three tasks with one repeatBoth arms solved 3/3; the contained arm cost more and took longerWrapping small work can be a regression
Paired edit and prewalk runnerRequires live paired outcomes before selecting another strategyA way to measure a policy; no live improvement claim yet

The needle fixture measures address emission, not a retrieval round trip. Read its receipt, the live counterexamples, and the edit-policy method.

Use containment when output is large, early, or repeatedly carried through a task. Keep small, complete results native. Compare completion, total usage, latency, and retrieval count together.

Entry pointSupport
Direct CLICapture and retrieval without host hooks
Claude CodeCommand rewrite and oversized-result substitution on supported hooks
CodexImplemented and contract-tested; live CLI receipt pending
AntigravityDeny recognized floods and return a bounded replacement command; no output substitution

Host capabilities states the exact contract. Commands retain the invoking user’s authority. Captured artifacts are local plaintext; redaction of the model’s view is not encryption at rest. Artifacts become eligible for collection after the configured horizon and remain until ctx gc runs. The project is pre-1.0.

Configuration · Troubleshooting · Documentation map