Context Saving

Pay for the failing test, not the 599 that passed.

Context Saving folds long tool output before the model reads it. Errors stay in full. The rest is archived, one lookup away.

Try it

Your agent runs 600 tests. 1 fails.

Printed17.0 KB
Sent to the model1.2 KB

Sent to the model

  • The failing test and its error
  • The summary line
  • One line for the 599 that passed

Kept in your archive

  • All 600 results, word for word
npm test fix loop · Claude Opus 5.5$0.087 → $0.06822% lower15 of 16 runs

Your agent reads an API response with 800 orders.

Printed800 orders
Sent to the model4 orders

Sent to the model

  • Every field name
  • The first 3 orders and the last
  • A line that counts the rest

Kept in your archive

  • The other 796 orders
One large JSON file · Claude Opus 5.5$0.086 → $0.06821% lower12 of 12 runs

One session, 30 steps. Tokens sent on each call.

Direct330,785
Context Mode75,591

Sent to the model

  • Your recent work, unchanged
  • An index of older work

Kept in your archive

  • Older work, word for word
Long agentic coding session · Claude Opus 5.5$7.20 → $2.4965.5% lower4 of 4 runs
How it works

17 KB printed. 1.2 KB read.

  1. 01Your agent runs a command

    Tests, builds, logs, big JSON.

  2. 02Context Mode folds the output

    Errors and summaries stay as printed.

  3. 03The model reads less

    And can read the full output back by id.

Proof

The same task, run twice. Cost per task.

Test fix loop, minitest

Direct$0.157
Context Mode$0.061

61% lower

npm test fix loop

Direct$0.087
Context Mode$0.068

22% lower

One large log

Direct$0.091
Context Mode$0.071

22% lower

One large JSON file

Direct$0.086
Context Mode$0.068

21% lower

Paired runs, Claude Opus 5.5, at API list price. Method and sources →

Features

Folded the first time the model sees it.

15 test runners

Failures stay, passing tests become one line.

JSON

Every key stays. Long arrays keep 3 items and the last.

Builds and logs

Your stack frames stay; library frames fold.

Cache-safe

A result changes once, so later requests reuse the cache.

Use cases: Failing test output · Keep the prompt cache warm

Try it on your next test run.

npx @context-mode/cli connects your agents. 1,000 requests free, no card.

Get started free

Your coding agent costs less and remembers your project.

Start free: 1,000 requests, every feature, no card. After you sign in, the console gives you one command to connect Claude Code or Codex.

Read the docs