Developer Cuts Claude Code Context Injection 80% by Pruning Unused Language Rules
A developer working with Claude Code identified that slow sessions and ignored instructions were caused by excessive context injection at session start, not model errors. Auditing revealed that the rules directory alone was injecting around 228KB of data — equivalent to roughly 57,000 tokens — every single session. The bulk of the bloat came from coding conventions for ten programming languages, such as Swift, Ruby, and Kotlin, that the developer never actually used. Because Claude Code loads the entire rules directory automatically rather than on demand, simply moving unused language folders outside the directory tree was enough to stop their injection. After the cleanup, context injection dropped to approximately 48KB, resolving both session lag and the problem of recent instructions being buried by earlier context.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in