When Claude Code’s source was briefly exposed via an npm sourcemap, the developer community got a rare look at how Anthropic engineers actually use their own tool. Turns out, they don’t use it out of the box.
Most people install Claude Code, type a prompt, and approve every permission pop-up like it’s a cookie banner. That’s roughly 20% of what the tool can do.
When the source code leaked on March 31, the community quickly surfaced how Anthropic’s own engineers configure Claude Code internally. The gap between “default Claude Code” and “Anthropic-configured Claude Code” is enormous.
Here’s what they do differently — and how you can copy it.
They Build Memory Systems, Not Chat Sessions
The single biggest difference: Anthropic engineers treat Claude Code as a persistent collaborator, not a stateless chatbot.
A 4-Level Instruction Hierarchy
Claude Code loads instructions from four levels, each overriding the last:
- System-wide (
/etc/claude-code/CLAUDE.md) — global defaults for all users on a machine - Personal (
~/.claude/CLAUDE.md) — your coding style, preferences, conventions - Project (
CLAUDE.md+.claude/rules/*.md) — team-shared standards, architecture notes - Local (
.claude/CLAUDE.local.md) — private context you don’t commit (internal URLs, team names, sensitive notes)
Most users have zero of these files. Anthropic engineers have all four.
The project-level rules directory (.claude/rules/) is particularly powerful. Instead of one giant instruction file, you drop focused files — testing.md, security.md, api-conventions.md — and they’re all loaded automatically.
Auto-Memory That Actually Learns
Claude Code has a background system that watches your conversations and extracts four types of memories into persistent files:
- User memories — your role, expertise level, preferences
- Feedback memories — corrections you’ve given (“don’t mock the database in tests”)
- Project memories — deadlines, constraints, ongoing initiatives
- Reference memories — pointers to external tools (your Linear board, your Grafana dashboard)
Each memory gets its own markdown file with structured frontmatter. Over time, Claude builds a detailed understanding of you, your team, and your project — without you manually writing anything.
There’s even a consolidation process called “Auto-Dream” that merges and deduplicates memories every 24 hours. Enable it with autoDreamEnabled: true in your settings.
The takeaway: If you’re re-explaining your project structure, coding preferences, or team conventions every session, you’re doing it wrong. Set up the memory hierarchy once and let it compound.
They Automate Everything With Hooks
Hooks are Claude Code’s most underutilized feature. The source reveals four types and 20+ event triggers that most users never touch.
Four Hook Types (Not Just Shell Commands)
Most people only know about command hooks. There are actually four:
- Command hooks — run a shell command (lint, test, deploy)
- Prompt hooks — ask an LLM to evaluate something (“is this bash command safe?”)
- HTTP hooks — call an external API (Slack, Linear, your CI system)
- Agent hooks — spawn a verification agent (“confirm all tests pass”)
Event Triggers You Didn’t Know Existed
Hooks can fire on 20+ events:
| Use Case | Event | Example |
|---|---|---|
| Gate dangerous commands | preToolUse |
Block rm -rf before it runs |
| Auto-test after edits | postToolUse |
Run pytest after any file write |
| Load context on start | sessionStart |
Check environment, pull latest configs |
| Save state on exit | sessionEnd |
Cleanup temp files, log session |
| Validate user input | userPromptSubmit |
Input sanitization |
The Pattern That Changes Everything
Set up a postToolUse hook with a Write matcher to auto-lint after every file change:
{
"hooks": {
"postToolUse": [
{
"matcher": "Write",
"hooks": [{
"type": "command",
"command": "npm run lint -- --fix --quiet",
"timeout": 15,
"async": true
}]
}
]
}
}
The async: true flag means Claude keeps working while the linter runs in the background. No blocking, no waiting.
The takeaway: If you’re manually running tests and linters after Claude edits files, you’re wasting time. Hooks automate the entire feedback loop.
They Eliminate Permission Fatigue
The “approve every command” experience is the number one complaint about Claude Code. Anthropic’s engineers solved it with pattern-based permissions.
Allowlists That Actually Work
{
"permissions": {
"allow": [
"Bash(git *)",
"Bash(npm test*)",
"Bash(npm run lint*)",
"Bash(python -m pytest*)",
"Read(**)",
"Edit(**)",
"Glob(**)",
"Grep(**)"
],
"deny": [
"Bash(rm -rf *)",
"Bash(*sudo*)",
"Bash(git push --force*)",
"Bash(git reset --hard*)"
]
}
}
The pattern: allow safe, read-only, and dev-loop commands. Deny destructive ones. Everything else gets prompted.
Five Permission Modes
| Mode | When to Use |
|---|---|
default |
Starting out, shared machines |
plan |
Complex refactors (shows plan first) |
acceptEdits |
Daily development (auto-approves file edits) |
dontAsk |
CI pipelines, sandboxed environments |
bypassPermissions |
Testing only |
Team-Shared Permissions
Put your permission rules in .claude/settings.json at your project root. It commits to version control, so every team member gets the same safe defaults. No more each developer independently configuring their own rules.
The takeaway: Switch to acceptEdits mode and set up an allowlist. You’ll go from approving 50 prompts per session to maybe 2.
They Tune the Engine
Effort Levels
export CLAUDE_CODE_EFFORT_LEVEL=high
Three levels: low (quick lookups), medium (balanced), high (deep reasoning). Most users run on medium by default. Use high for architecture decisions and complex debugging. Use low for “what does this function do?”
Cheaper Subagents
export CLAUDE_CODE_SUBAGENT_MODEL=claude-haiku-4-5-20251001
Run Opus for your main conversation, Haiku for research subagents. Same quality on the primary task, fraction of the cost on supporting work.
Context Window Control
export CLAUDE_CODE_MAX_CONTEXT_TOKENS=800000
If you’re hitting context compaction too often on large codebases, increase this. Claude uses a 10-section template to compress conversations, with “Current State” as the highest-priority section — so even after compaction, it knows what it was doing.
They Orchestrate Agents, Not Just Prompts
Custom Agents in .claude/agents/
Create reusable agent definitions:
.claude/agents/
├── security-reviewer.md
├── test-writer.md
└── docs-generator.md
Each file defines an agent’s personality, tools, and constraints. Claude spawns them by name when needed.
Worktree Isolation
Agents can work in isolated git worktrees so they don’t interfere with your working directory. Configure symlinkDirectories to avoid copying node_modules or .venv, and use sparsePaths in monorepos to limit what gets checked out.
Coordinator Mode
Enable CLAUDE_CODE_COORDINATOR_MODE=1 for multi-agent orchestration — one Claude plans, multiple workers execute in parallel on isolated worktrees.
The Complete Power User Config
Here’s a starting point that combines the most impactful settings:
{
"model": "claude-opus-4-6",
"effortLevel": "medium",
"fastMode": true,
"autoDreamEnabled": true,
"permissions": {
"defaultMode": "acceptEdits",
"allow": [
"Bash(git status*)", "Bash(git diff*)", "Bash(git log*)",
"Bash(npm test*)", "Bash(npm run lint*)", "Bash(npm run build*)",
"Read(**)", "Edit(**)", "Glob(**)", "Grep(**)"
],
"deny": [
"Bash(rm -rf *)", "Bash(*sudo*)",
"Bash(git push --force*)", "Bash(git reset --hard*)"
]
},
"hooks": {
"postToolUse": [{
"matcher": "Write",
"hooks": [{
"type": "command",
"command": "npm run lint -- --fix --quiet",
"timeout": 15,
"async": true
}]
}]
}
}
Copy it to ~/.claude/settings.json. Adjust the permissions and hooks for your stack. Iterate from there.
What This Really Means
The gap between a default Claude Code installation and a configured one isn’t incremental — it’s categorical. It’s the difference between a tool that asks you 50 permission questions per session and one that silently auto-tests, auto-lints, and remembers your preferences across weeks of work.
Anthropic’s engineers don’t have a secret version of Claude Code. They have the same version you do. They just actually configured it.
All configurations described in this post are available in the current public release of Claude Code. No proprietary or leaked code was used — these insights are based on publicly shared community discussions and official documentation.
