Output shortening: Lossless, Recoverable and Unchanged
TokenNibbler shortens long, routine tool output, such as test runs, search results and file lists, before Claude Code or Codex reads it, so your agent’s context holds the work instead of the noise. Every result is Lossless, Recoverable or Unchanged, and shortening is part of every plan, Free included.
The three kinds of result
Section titled “The three kinds of result”On this site we describe results as Lossless, Recoverable or Unchanged. In the app, the Activity page labels each result Shortened, Kept as is or Observed.
| On this site | In the app | What it means |
|---|---|---|
| Lossless | Shortened | The output is regrouped so it takes less space, and every match, path and line count is still there. TokenNibbler checks that the grouping expands back to the original exactly before using it. |
| Recoverable | Shortened | Some routine detail is left out of what the model sees, such as the names of passing tests. The full original is saved on your computer and the agent is told where to read it. |
| Unchanged | Kept as is | The output reaches the agent exactly as the tool printed it. |
| Unchanged (measured) | Observed | With Observe only on, output passes through unchanged and TokenNibbler measures what it could have shortened. |
Every Shortened result, Lossless or Recoverable, keeps its exact original on your computer.
Choose a mode
Section titled “Choose a mode”Choose how far shortening goes in Settings › Optimiser › Compression mode.
Conservative keeps every result Lossless:
- Removes terminal colour codes.
- In search results (
file:line:content), groups repeated file paths under one heading, keeping every match, its line and its content, in order. - Groups file listings (
git ls-files,rg --files,find) by folder, keeping every path. - Folds a long run of identical test or progress lines into one line and states how many more there were.
- Writes MCP records as compact tables, with nothing removed.
Balanced (the default) does everything Conservative does and adds Recoverable shortening:
- Folds runs of eight or more successful test lines, keeping the first, the last and the exact count. It recognises jest, vitest, mocha, TAP,
cargo test,go test -v,pytest -vanddotnet test. - In MCP results, trims web-page metadata, images and tracking links, and folds a repeated result.
Balanced is the default from version 1.0.2. If you were on Conservative before 1.0.2, the update moves you to Balanced. From 1.0.2 on, a mode you choose in Settings stays as you set it.
Observe only is a separate switch in the same tab. It measures potential reductions while passing every result through unchanged, and saves no original output.
MCP tool results are shortened in Claude Code, with their own switch: MCP tool results (Claude Code).
What always passes through unchanged
Section titled “What always passes through unchanged”TokenNibbler only shortens output from simple, recognised build, test, lint, type-check, search and listing commands, such as npm test, pytest, cargo test, rg, git grep, Select-String and Get-ChildItem -Name. Claude Code’s Grep and Glob results count as searches and listings. A leading cd <folder> && or cd <folder>; (also Set-Location) and a trailing 2>&1 are fine.
Everything else reaches the agent exactly as printed:
- Failed commands, and anything written to standard error.
- Output with errors, warnings, failures or similar diagnostics (search results and file lists are only regrouped, so they still qualify).
- All Git
status,log,diff,showandbranchoutput. - Pipes (except a final
| head,| tailor| Select-Object -First/-Lastafter a search or file listing), redirects other than a trailing2>&1, other compound commands, and unrecognised commands. - Source files read in full, images, and interrupted or background results.
- Short output (under 1,200 characters) and very large output (over 2 MB).
- Any result where shortening saves under 300 characters, or, with the recovery note added, under 100 characters or 5%.
- Projects outside your project scope, and everything while the optimiser is paused.
For MCP results, images, errors and results Claude Code saved to a file are left as they are.
Where originals are kept, and the note the agent sees
Section titled “Where originals are kept, and the note the agent sees”Before TokenNibbler returns a shortened result, it saves the exact original in the originals folder of its data folder. If the original cannot be saved, the agent gets the original output instead.
The shortened result starts with a note that tells the agent where the full original is:
[TokenNibbler: output shortened. Full original: <path>. Use Read to recover omitted detail. Local retention: up to 7 days, subject to storage limit.]Claude Code reads the file with its Read tool. For Codex, the note says “Read that file to recover omitted detail”.
To see exactly what happened to a result, open Activity and select View on its row. The viewer has four tabs: Changes, Side by side, Original and What the model saw. Open in editor opens the saved original.
How long originals are kept
Section titled “How long originals are kept”Choose both limits in Settings › Data:
- Keep original output: 1, 3, 7 (the default) or 14 days.
- Original output storage limit: 25, 50, 100 (the default) or 250 MB. When it is reached, the oldest originals go first.
The overall Storage limit in the same tab (500 MB by default) covers everything TokenNibbler keeps. When it is reached, the oldest saved output goes first, and originals saved in the last hour always stay.
Once an original is removed, its recovery path no longer opens, so choose a longer period if you often return to long sessions. Originals are kept as local files in TokenNibbler’s data folder on this computer and hold whatever the command printed. To open the folder, use Settings › Data › Local files › Open folder.