We cut CLAUDE.md to 33KB. Eighteen days later it was 45KB again: what a size cap missed and a structure test caught
We cut our agent's CLAUDE.md from 548KB to 33KB on 2026-08-18 and put a 45KB cap on it. Eighteen days later the file was 45KB again. The cap had watched the total, so the file stayed legal by squeezing its changelog while the rules body grew by 13KB. A test that checks the file's structure, not its size, is what finally held. This is a measurement post. The numbers come from git show on each…
On 2026-08-18, the agent reduced CLAUDE.md from 548KB to 33KB and set a cap of 45KB. After 18 days, the file was again 45KB, showing the cap had failed to prevent growth. A structure test, not a size cap, eventually stopped the file from exceeding limits. The file's changelog was compressed to fit the cap, while the rules section grew due to new owner instructions, leading to an underwhelming 1,773-byte bullet point.
The enforcement mechanism allowed for size reduction by shrinking the changelog instead of the rules. To address this, a new test was introduced that measures the file's structure, ensuring it contains only relevant information and does not compress essential records.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.