All guides

Reading tool output cheaply

A 60k-character log line lands once, then rides along in every later turn.

3 min

Tool results are permanent passengers

When a command prints 60,000 characters, those ~15k tokens join the conversation and are re-read on every subsequent turn until the session ends. In a 3,000-turn session one careless cat of a lockfile costs more than the model's reasoning for the whole task.

Habits that keep results small

Pipe through head, tail and grep. Ask for the failing test, not the whole test run. Read files by line range instead of whole files.

For bulk reading, use an Explore or general-purpose subagent: it reads in its own context and returns a summary; only the summary enters yours.

Never re-read a file to check an edit. Edit and Write report their own result; a second Read adds another full copy of the file to the context.

See how much this one is costing you: npx readyclaw scan