Dev.to
7/11/2026

The original title is: "Making a Bloated Claude Code Fast Again: Auditing Context Injection Down From 228KB to 48KB"
Original: Making a Bloated Claude Code Fast Again: Auditing Context Injection Down From 228KB to 48KB
Short summary
A practical audit of Claude Code's context injection revealed that auto-loaded rules/ files ballooned context to 228KB (57K tokens), causing slow startups and dropped instructions. By moving unused language rule directories out of the rules/ tree, injection dropped to 48KB (12K tokens), a 79% reduction. The key insight: rules/ loads everything in full every session, unlike selective @import.
- •rules/ directory is auto-loaded in full every session, not selectively via @import
- •Moving unused language rules out of the tree cut injection from 228KB to 48KB (79% reduction)
- •Distinguishing 'heavy session' from 'foggy session' symptoms leads to the right fix
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



