§05Using Archis

Tool output

Half of what an agent session spends is not your code — it is what your test runner, your build and your logs printed. Archis compresses that too, reversibly.

§01

The guarantee

Compression is never information loss. Shortened output carries a local://… reference, and the original bytes are still on the machine. Anything — the agent, or you — can ask for them back.

$ chi tools artifact get local://a41c…
prints the original, byte for byte

That is what separates this from truncation. A tool result cut off at 200 lines has thrown away the failure on line 900; a compressed one has moved it out of the context window while keeping it one call away. The agent sees the summary, decides it needs the detail, and fetches exactly the part it needs.

§02

What happens to an output

When a tool your agent ran prints something, four things happen in order, and each one is inspectable:

  • It is classified. Test output, build output, a log, JSON, JSONL, markdown, or plain text. --kind overrides the detection when you know better than it does.
  • A filter may apply, if one is in effect for the command that produced it and you have consented to that filter. See below.
  • It is compressed to fit the budget, keeping what a reader of that kind of output would look for first — the failures, not the first N lines.
  • The original is stored locally and referenced, so the step is reversible.

You can run any of this by hand on a file, which is the way to see what your agent is actually being handed:

$ cargo test 2>&1 | tee /tmp/out.txt
$ chi tools artifact /tmp/out.txt --command "cargo test"

--command matters: it is what selects a declarative filter, and without it no filter fires.

§03

Kinds

Each kind has a parser that knows what matters in it — which is why a failing test survives compression and a hundred passing ones become a count.

KindWhat survives
test_outputFailures with their assertions and locations; passes as a count.
build_outputErrors and warnings with their file and line; progress lines collapse.
logDistinct events and their counts, rather than every repetition.
json / jsonlStructure and representative values; long arrays are summarised.
markdownHeadings and the sections under the ones that matter.
plain_textThe fallback, used when nothing more specific fits.

chi tools artifact stats reports what the store holds and how it is being used, including which kinds are actually turning up in your work.

§04

Filters and consent

A declarative filter is a rule that says what to keep from a particular command's output — the thing you would write once for your own noisy build script and never think about again.

$ chi tools filters list
every filter in effect, and every one that is not, with the reason
$ chi tools filters check "cargo test" ./out.txt
runs the filter for that command over the file, and prints what a model would see

Filters are opt-in per file, by content. chi tools filters trust <file> consents to that filter file as it is right now. Edit it and consent lapses until you trust it again, which is the property that matters when a filter file arrives from somewhere other than your own hands — a repository you cloned, a teammate's branch. chi tools filters untrust withdraws it.

§05

The local store

Originals live in a store inside .chi. It is on your machine and nowhere else, and it is bounded — a retention policy with a time-to-live, a count ceiling and a byte quota, so it cannot grow without limit.

CommandWhat it does
chi tools artifact statsWhat the store holds and how it is being used.
chi tools artifact purgeApplies the retention policy now — the ordinary sweep.
chi tools artifact purge --allDeletes every stored original.

Purging affects recovery, not the record: outputs already sent to a model are unaffected either way. This is the recovery path, so the only thing you lose by emptying it is the ability to fetch an original back.

§06

Measuring what it costs you

chi tools discover answers the question that decides whether any of this is worth your attention: what did my agents already spend on tool output, and how much of it never reached Archis?

$ chi tools discover
$ chi tools discover --recommend
also says which parser or filter would recover the most next

It reads coding-agent transcripts already on your disk, replays the output they captured through the real pipeline, and reports what Archis would have avoided. Two properties are worth stating plainly:

  • It reads tool calls and their outputs only — never prompts, and it stores nothing. It is a measurement, not a collection.
  • The two arms are never added together. What Archis already saved and what it could still save are reported separately, because summing them would double-count and produce a number that is larger than the truth.

For the code side of the same question, see chi measure and chi session report in Core concepts.