$ recombobulate _
home / tips / keep-your-context-window-clean
keep-your-context-window-clean

Claude Code has a large context window, but it's not infinite. A few habits will keep it working efficiently.

Instead of reading 20 files yourself, let a subagent do the research in a separate context:

"Search the codebase for how authentication is implemented"

Claude will spawn an Explore agent that reads files in its own context, then returns a summary — keeping your main window clean.

Be specific about what you need. Instead of "Look at the User model", try:

"What validation rules does the User model use for email?"

Use /clear or start a new session when switching to unrelated work. A conversation about database migrations doesn't need the context from your CSS refactor.

You can also create a .claudeignore file to exclude directories Claude doesn't need to read:

node_modules/
vendor/
storage/
.git/
public/build/

The key principle: a focused context gives better answers than a cluttered one.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Move Specialised CLAUDE.md Instructions into Skills to Shrink Context

CLAUDE.md loads into every message. Move workflow-specific instructions into skills that load on demand to reduce token costs across your session.

bagwaa @bagwaa · 3 hours ago
0
Filter Test Output with a PreToolUse Hook to Cut Token Costs

A PreToolUse hook can intercept test runner commands and filter output to show only failures, cutting thousands of tokens from Claude's context.

bagwaa @bagwaa · 3 hours ago
0
Use prompt.id to Trace All Activity from a Single User Prompt

Every event emitted while processing a single prompt shares a prompt.id UUID, letting you trace the complete chain of API calls and tool executions.

bagwaa @bagwaa · 3 hours ago