Practical Tips
10 actionable tips derived from reading Claude Code's source code. These reflect deliberate architectural decisions that shape how the tool behaves.
Use CLAUDE.md: it shapes everything
CLAUDE.md is the first thing loaded into context and guides all of Claude's behavior. Put it at the repo root. Every rule, convention, or piece of context you write there is applied automatically on every session.
Section 1: System PromptThe memory system is persistent across sessions
Claude saves things between sessions in ~/.claude/projects/<slug>/memory/. You can ask it to remember facts, preferences, or decisions and it will retrieve them in future conversations automatically.
Section 4: Memory SystemExplore agents use Haiku: delegate searches to them
The Explore agent uses the cheaper and faster Haiku model (not your main model). For simple codebase searches, asking Claude to use the Explore agent saves tokens and money compared to the main model doing the same search.
Section 3: Agent System/fast costs 6x more for the same model
WarningFast mode does not switch to a different model. It uses the same Opus 4.6 but with priority throughput. The cost jumps from $5/Mtok to $30/Mtok input, a 6x premium. Use it only when speed is genuinely worth the price.
Section 7: CostsAuto-compact triggers at ~13K tokens from the limit
When ~13,000 tokens remain before your context limit, Claude automatically forks an agent to summarize the conversation. You can run /compact manually before hitting the limit to get a cleaner, more controlled compression.
Section 6: Context & CompactionbypassPermissions skips ALL safety checks
DangerThis permission mode auto-approves every single tool call, including destructive ones like file deletion or git force-push. Only use it in fully trusted, isolated environments where you have reviewed what will run.
Section 5: PermissionsThe YOLO classifier blocks curl, wget and ssh in auto mode
In auto permission mode, a 2-stage AI classifier blocks certain commands considered high-risk: curl, wget, ssh, git, kubectl, aws, and more. If you need these in auto mode, you must approve them manually or configure explicit allow rules.
Section 5: PermissionsMEMORY.md has a hard 200-line limit
WarningThe MEMORY.md index file is always loaded into context. If it exceeds 200 lines or 25KB, it is silently truncated and the excess entries simply disappear. Keep the index concise and never write memory content directly into it, only pointers to individual files.
Section 4: Memory SystemYou can define fully custom agents in markdown files
Custom agents are defined in .md files with YAML frontmatter specifying tools, model, and permission mode. Claude loads them automatically. You can build specialized agents with restricted tool sets for safer, more focused tasks.
Section 3: Agent SystemThe Verification Agent always runs in the background
The built-in Verification Agent runs after implementations and always emits a structured verdict: PASS, FAIL, or PARTIAL. It appears in red in the terminal to stand out. This makes it useful as an automated quality gate in CI/CD workflows.
Section 3: Agent System