EPISODE · Jun 1, 2026
Context windows and CLAUDE.md hierarchies: why long sessions go dumb, and how to keep them sharp
from OCDevel Claude Code Podcast
Two hours into a session, Claude starts re-reading files and forgetting the conventions you set at the start. That's a full context window, not a smarter assistant. Learn to read the /context meter, when to /compact versus /clear, how to push noisy work into a subagent, and how to structure a multi-file CLAUDE.md hierarchy so the right instructions load at the right depth instead of silently eating your token budget. Episode page & show notes Try a walking desk - stay healthy & sharp while you learn & code The context window is the scarce resource Claude Code thinks inside of, and managing it turns out to be the same skill as managing your CLAUDE.md files. This episode covers both halves and the one idea underneath them: a fuller window is a slower, more forgetful, more expensive Claude, not a smarter one. Anthropic frames the whole craft in Effective context engineering for AI agents as finding the smallest set of high-signal tokens that does the job, and we build practical habits around that. First, the mechanics. What's already loaded before you type (system prompt, tools, skills, MCP servers, and your CLAUDE.md), and why long sessions degrade: context rot, the attention budget, the quadratic cost of attention, and lost in the middle. The context-window docs ship an interactive walkthrough and the load order we use throughout. Then the workflow. Reading the /context meter (including the autocompact buffer it reserves), /compact with focus instructions, what survives a compaction versus what silently vanishes, and the /clear-versus-/compact-versus-fresh-session decision rule. Plus offloading noisy work to a subagent (the docs' own example reads 6,100 tokens and returns 400), and quick memory with the # shortcut and /memory. Sources: Manage costs effectively. The second half is the memory hierarchy: managed policy, user, project, and local CLAUDE.md files, how they concatenate rather than override, and how Claude discovers them by walking up the directory tree at launch and loading nested subdirectory files on demand. We cover @-imports (and why they don't save context), the monorepo pattern with path-scoped rules in .claude/rules/, and what belongs in CLAUDE.md versus a skill or a hook. The pitfall: a bloated, stale CLAUDE.md silently eats your window on every turn and you can't see it in the terminal. How to catch it with /context and /memory, and how to fix it by moving instructions to where they load on demand. Earlier episodes referenced: subagents, skills, hooks, and MCP servers.
What this episode covers
Two hours into a session, Claude starts re-reading files and forgetting the conventions you set at the start. That's a full context window, not a smarter assistant. Learn to read the /context meter, when to /compact versus /clear, how to push noisy work into a subagent, and how to structure a multi-file CLAUDE.md hierarchy so the right instructions load at the right depth instead of silently eating your token budget.
NOW PLAYING
Context windows and CLAUDE.md hierarchies: why long sessions go dumb, and how to keep them sharp
No transcript for this episode yet
Similar Episodes
Mar 26, 2026 ·1m
Jan 2, 2026 ·47m
Dec 21, 2025 ·46m