compact_output
Compacts noisy command output by stripping ANSI, deduplicating spam, collapsing stack traces, and extracting errors. Use when test, build, or lint output is too long.
Instructions
Compact noisy command output before reading it. Strips ANSI, dedupes spam, collapses stack traces, extracts errors, and attaches short fix cards for known error codes (TS####, ECONNREFUSED, npm ERESOLVE). Use when test/build/lint output is long.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | failure = compact hard only on failure (default) | |
| budget | No | Max output tokens after compaction | |
| output | Yes | Raw stdout+stderr from a command | |
| exit_code | No | Command exit code if known (0 = success) |