Claude Code is Anthropic's official agentic coding tool — now available as a CLI, desktop app (Mac/Windows), web app (claude.ai/code), and IDE extensions for VS Code and JetBrains. It autonomously reads, writes, and runs code across your entire project.
Architecture Deep Dive → Claude Code Architecture Breakdown — two-layer harness design, context engineering strategies, permission model, MCP extension points, and how it compares to Codex's kernel-level sandboxing.
Why It's in Adopt
Claude Code has evolved significantly since its initial CLI-only release. It remains one of the most capable agentic coding tools available, now with multiple interfaces:
- Terminal CLI — the original and still the most powerful interface for shell-heavy workflows
- Desktop app — native Mac and Windows app for a more visual experience
- Web app — claude.ai/code for browser-based access
- IDE extensions — VS Code and JetBrains integrations
- Background agents — run tasks asynchronously while you work on other things
- Scheduled tasks — recurring agents on a cron schedule for automated maintenance
- Routines (April 2026) — automations that run without an active session, bundling a prompt, repo, and connectors into a single configuration. Routines can run on a schedule, fire from an API call, or trigger off GitHub events like new PRs — replacing the need for custom CI-based agent wrappers
- Hooks — 17 programmable hook events that execute shell commands in response to Claude Code actions (tool calls, file edits, command execution, etc.)
- Agent Teams (experimental, opt-in via
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS) — coordinate multiple fully-independent Claude Code sessions as a team. One session acts as the team lead; others are teammates, each with their own context window. Unlike subagents (which only report back to the caller), teammates share a task list, claim work autonomously via file-locking, and message each other directly. Teams support two display modes: in-process (Shift+Down to cycle) or split-pane (tmux/iTerm2). New hooks:TeammateIdle,TaskCreated,TaskCompletedlet you enforce quality gates. Teammate roles can be defined as reusable subagent definitions. Known limitations: no session resumption for in-process teammates, task status can lag, one team per lead, no nested teams. Requires v2.1.32+. (docs) - Computer Use Agent (research preview, March 23 2026) — Claude can see and control your desktop via a screenshot-analyze-act loop, clicking buttons, opening apps, and navigating browsers. Available in both Claude Code and Cowork on Pro/Max plans (Anthropic blog, CNBC)
- MCP server support — connect to external tools, databases, and APIs
- Skills (
.claude/skills/SKILL.md) — domain knowledge and reusable workflows loaded on demand; won't bloat every conversation the way CLAUDE.md does. Invoke with/skill-name. Usedisable-model-invocation: truefor side-effect workflows you trigger manually. - Subagents (
.claude/agents/) — specialized assistants with their own tools, models, and context; delegate research or review without polluting your main conversation - Plugins — bundled skills, hooks, subagents, and MCP servers in one installable unit; browse with
/plugin - Plan Mode — read and plan without making any changes (Ctrl+G to edit plan in your editor before proceeding)
/btw— side questions that never enter conversation history, keeping context clean/rewind— checkpoint restoration: restore conversation, code, or both to any previous state/compact <instructions>— selective compaction (e.g./compact Focus on the API changes)claude --continue/--resume— pick up where you left off across sessions
As of April 17, 2026, Claude Code defaults to Opus 4.7 with a new xhigh effort level, Auto mode for Max subscribers (model selection handled automatically), and new /effort and /ultrareview slash commands for fine-grained control over reasoning depth. Windows support and permission prompt ergonomics also improved.
Claude Code now authors ~4% of all public GitHub commits (~135K/day) and leads SWE-bench Verified at 80.8% — the highest score of any coding agent on complex, real-world bug fixes.
It's particularly well-suited to tasks that span many files or require running code to verify correctness — things that in-editor tools struggle with.
How It Works
# Install
npm install -g @anthropic-ai/claude-code
# Run in your project directory
claude
# Then describe what you want in plain English
> Add rate limiting to the /api/login endpoint
Claude Code reads your files, plans a solution, makes the changes, and can run your tests to verify. You review and approve changes before they're committed.
Safety Architecture
Claude Code enforces safety at the application layer — a fundamentally different approach from OpenAI Codex's OS kernel-level sandboxing (Landlock, seccomp, Seatbelt). The trade-off:
| Dimension | Claude Code | Codex CLI |
|---|---|---|
| Enforcement | Application layer (permission model + 17 hook events) | OS kernel (syscall-level deny) |
| Programmability | High — hooks can encode business logic, run linters, validate schemas | Low — coarse allow/deny |
| Escape-proof | No — but highly configurable | Yes — model cannot circumvent OS-level denial |
This means Claude Code is more expressive for teams that want to encode policy (e.g. "run ESLint before every file write", "block commits to main"), while Codex is stronger against adversarial escape. Both approaches are valid — they optimize for different concerns.
Configuration: CLAUDE.md vs AGENTS.md
CLAUDE.md is Claude Code's project configuration file — more powerful within Claude (persistent context, coding conventions, build commands, project structure) but only works with Claude Code. AGENTS.md is the cross-tool open standard (Linux Foundation / AAIF) that works across Codex, Cursor, Copilot, Windsurf, Gemini CLI, and others. Teams using multiple tools benefit from AGENTS.md portability; teams committed to Claude Code get more depth from CLAUDE.md. Both can coexist in the same repo.
Key Concepts for Newcomers
- Agentic: Unlike a chat interface, Claude Code takes actions — it doesn't just tell you what to do, it does it.
- Permission model: Claude Code asks before running commands or making changes you haven't approved.
- Context: It automatically reads relevant files rather than requiring you to paste them in.
- CLAUDE.md: A project file that gives Claude Code persistent context about your codebase — coding conventions, build commands, project structure.
Key Characteristics
| Property | Value |
|---|---|
| Interface | Terminal CLI, Desktop app, Web app, IDE extensions |
| Provider | Anthropic |
| License | MIT (CLI); Proprietary (Claude.ai Terms) |
| Pricing | Anthropic API usage or Claude Max subscription |
| Underlying model | Claude Opus 4.7, Opus 4.6, Sonnet 4.6, Haiku 4.5 |
| SWE-bench Verified | 80.8% |
| Sandbox | Application layer (permission model + 17 hook events) |
| GitHub | anthropics/claude-code |
| Website | claude.com/product/claude-code |
| Docs | docs.anthropic.com/en/docs/claude-code |
Cost of Ownership
Claude Code's pricing model is fundamentally different from its competitors — and the difference matters more than the headline price.
| Tool | Pricing Model | Monthly Cost (Individual) | Cost Structure |
|---|---|---|---|
| Claude Code | API usage or Max subscription | Max ~$100–200/mo; API varies | Pay for tokens consumed |
| Cursor | Subscription + credits | $20–200/mo | Fixed seat + model credits |
| GitHub Copilot | Subscription | $10–39/mo/seat | Flat rate, all-you-can-eat |
| OpenAI Codex | Bundled with ChatGPT | $20–200/mo | Included with subscription |
| Devin | Subscription + compute | $20/mo + $2.25/ACU | Pay per 15-min task unit |
| OpenHands | Self-hosted + API keys | $0 + API costs | Ops overhead is the hidden cost |
The real cost question is cost per completed task, not monthly subscription. Claude Code on API billing uses ~4x more tokens than Codex per task (trades efficiency for thoroughness), but its higher SWE-bench score means fewer failed attempts and less human rework. A task that takes Claude Code $2 in tokens but succeeds on the first try is cheaper than a $0.50 attempt that requires a human to finish.
For teams: GitHub Copilot at $19–39/seat is the cheapest all-you-can-eat option and the right choice if your primary use case is completions and light agent work. Claude Code on API billing makes sense for heavy agentic usage where per-task success rate matters most. Cursor's credit model is the most complex to budget — the "unlimited auto-mode" is unlimited only when Cursor picks the model.
Claude Code Security (Research Preview)
Anthropic launched Claude Code Security on February 20, 2026 — an AI-driven vulnerability scanning capability built on top of Claude Code (web). Unlike traditional SAST tools, it reasons about code rather than pattern-matching: it traces data flows across files, understands context, and identifies multi-component vulnerability patterns that rule-based scanners miss.
Key characteristics:
- Uses Claude Opus 4.6 as the scanning engine
- Multi-stage verification: findings are re-analyzed to filter false positives before surfacing
- Human-in-the-loop: each finding includes a confidence rating; patches are suggested but require human approval before application
- Identified 500+ high-risk vulnerabilities across production OSS codebases in its initial runs — some issues had existed for decades, surviving many rounds of manual review
- Available to Enterprise and Team customers, with expedited access for OSS maintainers
(Anthropic announcement, Help Net Security)
Effective Patterns (from Official Docs)
The single highest-leverage practice: give Claude a way to verify its own work. Tests, screenshots, or expected outputs let Claude self-correct without requiring your attention on every mistake.
Explore → Plan → Code → Commit — use Plan Mode to read and plan before touching any files. For multi-file changes or unfamiliar code, this avoids solving the wrong problem. Skip planning for trivial, single-sentence fixes.
Writer/Reviewer pattern — run two parallel sessions. Session A implements; Session B reviews from a clean context (no bias toward code it just wrote). Reviewers regularly surface edge cases the writer missed.
Context threshold: agents are token-intensive — monitor context usage and act before hitting ~60% capacity. Use /compact, /handoff, or start a fresh session to avoid the degraded performance that comes from a nearly-full context window.
MCP servers and context cost: every connected MCP server loads its tool definitions into the context window at startup. Be selective — connect only the servers you actively use in a given session rather than leaving all of them enabled by default.
Common failure patterns to avoid:
- Kitchen sink session: unrelated tasks in one session pollute context —
/clearbetween tasks - Correction loop: two failed corrections signal a bad prompt, not a dumb model —
/clearand rewrite with what you learned - Over-specified CLAUDE.md: too many rules means important ones get lost — prune to what Claude actually gets wrong
- Infinite exploration:
"investigate X"without scope reads hundreds of files — use subagents so exploration doesn't consume main context
Further Reading
- Claude Code Architecture Breakdown — full deep dive into the agentic harness, context engineering, and safety model
- Claude Code Security — official product page
- Effective Context Engineering for AI Agents (Anthropic)
- Building Effective Agents (Anthropic)