C Claude Code Internals
EN | ES

Practical Tips

10 actionable tips derived from reading Claude Code's source code. These reflect deliberate architectural decisions that shape how the tool behaves.

10 tips ~512K lines analyzed Section 11 of ANALYSIS.md
i How these were found
These tips come from analyzing ~1,884 TypeScript files in the Claude Code source. Knowing how the internals work lets you use the tool more intentionally, by understanding the actual architecture rather than guessing.
Standard tip Worth extra attention Use with caution
01

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 Prompt
02

The 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 System
03

Explore 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
04

/fast costs 6x more for the same model

Warning

Fast 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: Costs
05

Auto-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 & Compaction
06

bypassPermissions skips ALL safety checks

Danger

This 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: Permissions
07

The 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: Permissions
08

MEMORY.md has a hard 200-line limit

Warning

The 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 System
09

You 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 System
10

The 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