The audit footer
Compaction in banish is auditable and reversible. When a filter drops lines from a large output, the compact result ends with a footer that accounts for every one of them, names the filter responsible, and gives you a one-command way to get the original back. Available since v0.6.0.
What the footer shows
Each group is one filter stage and the exact number of lines it removed. The labels tell you what kind of content was dropped before you decide whether you need it:
| Label | What was dropped |
|---|---|
<filter>.drop | Lines matched by a !drop or !keep rule - warnings, passing tests, progress noise. |
<filter>.pipe | Lines removed by the filter's !compact shell pipe. |
<filter>.per-group | Repeats past the per-group cap, already marked inline with +N more. |
<filter>.max-lines | Overflow past the total line cap, also marked inline. |
An agent reading the footer knows exactly how much was removed, by what, and what recovering it would cost - so it can trust the compact view by default and reach for the raw output only when a needed detail is missing.
Recover the raw output
This prints the original stdout and stderr byte for byte, straight from a local
cache - no re-running the command, no re-paying for its execution. The token
estimate on the recover line is the price of reading it all back; treat it as a
last resort, not a habit. MCP agents get the same pathway as a banish_raw tool.
The raw cache
Raw outputs live in ~/.banish/cache/raw/, private to your user (files 0600,
directory 0700) and never inside a repository. Entries expire after 1 hour and
the cache is capped at 50 MB, evicting oldest first. Both limits are configurable
in ~/.banish/config.json:
Command output can contain whatever the command printed, including secrets. If you would rather keep nothing on disk, disable the cache entirely:
Or empty it at any point:
Trace mode
Writing or tuning a filter? Set BANISH_TRACE=1 and every silently dropped run
is annotated in place instead of removed:
The output shows exactly where each filter stage cut content, which makes a new
.bsh filter easy to verify before you rely on it.
When the footer appears
Only when it pays for itself. Small outputs - under 40 raw lines, under 2.5 KB, or with trivial savings - are passed through or kept whole, with no footer and nothing to recover. A typical footer costs about 37 tokens and points at hundreds or thousands of recoverable ones.
The footer rides inside the output your agent already reads, so it is counted in the savings numbers - the methodology measures what the agent actually sees, footer included.
Next: see how the footer reaches your agent through the bash proxy, or write your own filter in the .bsh language.