Solutions

CLAUDE.md is too big. What do you take out?

Updated

Cut the facts and keep the instructions. An instruction tells the agent how to behave and is worth paying for on every session: the package manager, the test command, the conventions, the mistake to avoid. A fact records something about the system - why a module is the way it is, what was tried and abandoned, which dependency is pinned and why. Facts are what make the file grow, they are what goes stale without warning, and they are needed on perhaps one job in ten. Move them somewhere an agent fetches on demand and the file stops growing.

It started as twenty lines. It is several hundred now, it loads on every session before the agent has done anything, and you can feel it in the context window: compaction arrives sooner and the agent starts losing the middle of long jobs. Trimming feels wrong, because every line went in for a reason - something went wrong once, and this was the fix.

The reason these files bloat is that both kinds of line arrive by the same route. Something goes wrong, you correct the agent, and the correction is written down - but only half of those corrections are rules. The other half are things now known about the codebase, and only the rules earn a place in a file read before every task. In Forkbench the second kind becomes a note on the Thread the work lives in, listed and read when it is relevant, so the context is spent at the moment of use rather than on every session. It also fixes staleness in the only way that works: a note carries who wrote it and when it was last touched, and an agent that finds it wrong revises it in place instead of leaving a contradiction in a file nobody re-reads.

How it works

  1. 1Read the file with one question per line: is this an instruction to follow, or a fact about the system?
  2. 2Leave the instructions. That is usually a much shorter file than the one you have.
  3. 3Move the facts into notes on the Thread, keeping what is still true and dropping what described a problem you have since fixed.
  4. 4Tell your agents that findings go in notes and not in the instruction file, or it regrows within a fortnight.
  5. 5Re-check the file the next time an agent does something surprising. The line that would have prevented it is an instruction, and it belongs back in.

Straight about the guarantee: This is a judgement about your own file, not something Forkbench performs on it - it does not read, write or trim CLAUDE.md or AGENTS.md. What it offers is the other place to put the material, so that the trim is not simply a deletion.

Frequently asked

Sources