One generated file outweighed all 70 hand-written source files, so I redrew what Claude Code may read
I profiled a repository I actually run to see which areas consume the most context. Here is what I found, the deny rules I settled on, how search selectivity changes the math, and the options I considered but rejected.
The Line That Disappears at 100K: Measuring What Tool-Output Spill Actually Keeps
When agent tool output passes 100,000 characters, the full text spills to a file and the model sees only a head-truncated preview. Here are measured survival rates from a real repository, and the output envelope I built to push decision-relevant lines to the front.
The Morning My Table Ended in "… 2,847 more rows" — Separating Render Caps from Token Cost in Tool Output
Claude Code 2.1.209 caps markdown tables at 200 rows plus a remainder count. Only the rendering is capped — the model still receives every row. Here is how to measure the gap and redesign tool output around aggregates.
Carrying Decisions Across Compaction with PreCompact and SessionEnd Hooks
Auto-compaction does not delete your conversation. It deletes the reasons behind it. Here is a working PreCompact / SessionEnd / SessionStart hook pipeline that rescues decisions to disk and hands them to the next session, with real code and measurements.
When to Use Claude Code's Native 1M Context — and When Not To: A Cost-Based Rule
With Sonnet 5 as the default, Claude Code now handles a native 1M-token context. A big window is convenient, but every token you park in it is billed again each turn. Should you load the whole repo, or feed slices? Here is an estimable token model and a decision rule that gives a concrete answer per situation, with working code and the traps to avoid.
Claude Keeps Making the Same Mistake — Why Corrections Don't Stick and How to Fix It
Why Claude repeats mistakes even after correction, and how to make your instructions stick permanently using Projects, custom prompts, and smarter conversation design.
Claude Code Stops Mid-Execution: Complete Diagnostic Guide
Diagnose why Claude Code freezes or stops mid-task. Covers context budget exhaustion, unresponsive subagents, infinite loops, and tool timeouts with actionable fixes for each scenario.
/clear vs /compact in Claude Code: Choosing the Right Reset for Long Sessions
When should you use /clear, and when should you reach for /compact in Claude Code? Three decision criteria from real long-session experience, with the pitfalls that hit me before I figured it out.
Four Practical Techniques to Keep Claude Conversations Lean Before They Get Heavy
Noticing your Claude Pro limits creeping up during a long working session? Most of the cost comes from dragging one conversation on too long. Here are four techniques I use daily to keep chats light.
Projects and Memory — Managing Context with Claude.ai's Projects Feature
Learn how to use Claude.ai's Projects feature to manage context, add custom instructions, upload files, and collaborate with your team. Master organization for better conversations.