Navin

Command output compaction

Shell output from the agent (exec) is compacted before it is added to the model context. Progress noise, repeated lines, and oversized tables are reduced; failures and status that matter are kept. Compaction is built into Navin - no external filter to install.

Live terminal output is not altered while a command is running. Compaction applies to the finalized result the model receives.

Covered commands

AreaExamplesResult for the model
Gitstatus, diff, log, pushGrouped status; progress stripped
Testspytest, jest/vitest, cargo/go test, playwrightFailures and summary first
Pythonruff, mypy, pip, uvFindings or install summary
JS / buildeslint, tsc, next, npm installErrors first
Containersdocker / podmanEssential columns; deduplicated logs
Kuberneteskubectl, oc, helmCompact tables; quieter describe
Infraterraform, make, gradleErrors and summary
Networkcurl, ghShort bodies or tables
Otherunmatched commandsANSI / progress / duplicate cleanup

Shell wrappers such as bash -lc '…' are resolved so the underlying command is classified correctly.

Timing

SituationCompaction
Synchronous execAfter the process exits
Background execWhen the process completes
write_stdin sessionWhen the process completes
Streaming live outputNone (terminal stays as-is)

When the compacted text is shorter than the original, the full log is stored under .navin/tool-results/exec/ and the tool result notes the path.

Cost

Compaction lowers tokens from tool output on command-heavy sessions. System prompts, tool schemas, and chat history are unchanged. It is a context hygiene feature, not a full-bill discount.

Related