Terminal evidence without boilerplate replay

Show the new terminal evidence, not the same log again.

Capsule projects command results only when the visible evidence can be smaller without hiding failures or weakening recovery. The frequent paths are run, batch, and flow.

What the projection keeps

Failures first

Exit status, stderr, failed tests, and critical diagnostics stay visible. A failed command is not treated as disposable boilerplate.

Novel lines

Repeated successful rows, duplicated prefixes, and stable noise can collapse while changed evidence remains in the view.

Structured output

JSON records, diffs, and paths use shape-aware projections that preserve identity and can be expanded exactly.

Exact archive

The original stdout and stderr are archived before projection, with a real capsule identifier for recovery.

Measure before and after

npm run benchmark:io; npm run benchmark:terminal; npm run benchmark:terminal-real

Use the same command, environment, and output requirement for the baseline and Capsule arms. Compare model-visible bytes or token estimates, exit/failure preservation, recovery success, and latency. Include small and explicit-full cases: if the wrapper would be larger, Capsule passes the literal result through.

Safe command families

ActionUseful forFallback trigger
runOne command with bounded stdout/stderr evidence.Unsafe shell semantics, failed classification, or explicit raw output.
batchIndependent commands with bounded concurrency and stable input order.Dependency-sensitive steps or a result that needs full detail.
flowDependent command sequences with exact receipts between stages.Missing dependency evidence, mutation risk, or a failed prerequisite.

A terminal reduction is a workload-specific model-visible measurement. It does not prove a fixed reduction in hidden reasoning, provider billing, provider cache usage, or subscription limits.

For file-specific reads, use the Get-Content guide. For broad MCP workflows, see MCP context compression; report reproductions in the measurement discussion.