Failures first
Exit status, stderr, failed tests, and critical diagnostics stay visible. A failed command is not treated as disposable boilerplate.
Terminal evidence without boilerplate replay
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.
Exit status, stderr, failed tests, and critical diagnostics stay visible. A failed command is not treated as disposable boilerplate.
Repeated successful rows, duplicated prefixes, and stable noise can collapse while changed evidence remains in the view.
JSON records, diffs, and paths use shape-aware projections that preserve identity and can be expanded exactly.
The original stdout and stderr are archived before projection, with a real capsule identifier for recovery.
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.
| Action | Useful for | Fallback trigger |
|---|---|---|
run | One command with bounded stdout/stderr evidence. | Unsafe shell semantics, failed classification, or explicit raw output. |
batch | Independent commands with bounded concurrency and stable input order. | Dependency-sensitive steps or a result that needs full detail. |
flow | Dependent 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.