Thinking in Code
Analyze a 7 MB file. Pay for 407 bytes.
Your agent writes a short script. Context Mode runs it, and only what it prints reaches the model.
Question: how many versions of react are on npm?
Sent to the model
- The first 1.4% of the file
Never read
- The other 98.6%
Question: how many versions of react are on npm?
Sent to the model
- The answer: 2,959 versions, the latest stable one, and their dates
Never sent
- The 7 MB file itself
The script reads. The model reads the answer.
- 01The agent writes a script
For example, count versions in a registry document.
- 02Context Mode runs it
Public data in a sandbox, local files on your machine.
- 03Only the result comes back
The script read 7,011,585 bytes. The model read 407.
Data analysis, run twice. Cost per task.
Claude Haiku 4.5
64% lower
Claude Opus 5.5
10% lower
Paired runs, 2026-09-29. Correct answers were equal in both arms. Method and sources →
Two places to run.
Web pages and APIs, read in a sandbox that reaches only the sites you allow.
Files on your machine, read by your agent with its own permissions.
Every host a script calls meets your rules.
Use cases: Analyze large files
Keep raw data out of the prompt.
npx @context-mode/cli connects your agents. 1,000 requests free, no card.