Claude Code is Anthropic's coding agent. It writes and runs tests, fixes failures, works with git and opens pull requests in your repo. It runs in the terminal, IDE extensions, a desktop app and the web.
Short answer: Claude Code can:
- Build and fix: edit code, then run tests and fix failures.
- Ship: stage changes, write commits, create branches and open PRs.
- Remember: load CLAUDE.md files and auto memory every session.
- Extend: connect external tools over MCP, run subagents, and add hooks that can block a tool call.
- Cost: included in Pro and Max; API use bills per token.
How Claude Code works: it plans, tests and ships
Claude Code works as a loop inside your repo, not a chat window. Anthropic's Claude Code overview says it "stages changes, writes commit messages, creates branches, and opens pull requests."

- Plan. Run
claude --permission-mode plan, or press Shift+Tab. It reads files and proposes a plan, with no edits until you approve. - Test and fix. One prompt can write tests, run them and fix failures.
- Ship. It stages changes, writes commit messages and opens a PR.
- Resume.
claude --continueresumes the latest session;claude --resumepicks from a list.
Two more tools help. claude --worktree feature-auth runs an isolated parallel session. claude --from-pr 1234 opens the session picker filtered to sessions linked to that PR.
Try it yourself in one command
Install with curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL. On Windows PowerShell, use irm https://claude.ai/install.ps1 | iex. Native installs update in the background; Homebrew installs do not.
Then run the docs' own example:
claude "write tests for the auth module, run them, and fix any failures"
Watch it run tests and react to failures. For scripts, pipe input with -p: git diff main --name-only | claude -p "review these changed files for security issues". You can also drop in an image by drag and drop, Ctrl+V or a file path.
CLAUDE.md memory works as guidance, not a guarantee
Each session starts with a fresh context window. Two mechanisms carry knowledge across sessions: CLAUDE.md files and auto memory. The memory docs list four CLAUDE.md scopes:
- Managed policy: org-wide, for example
/etc/claude-code/CLAUDE.mdon Linux. - User: your own file for every project.
- Project:
./CLAUDE.mdor./.claude/CLAUDE.md. - Local:
./CLAUDE.local.md; add it to .gitignore.
Target under 200 lines per file. The docs say longer files "consume more context and reduce adherence." Imports can nest to a maximum depth of four hops. Auto memory loads the first 200 lines or 25KB each session, per repository, shared across worktrees. In monorepos, claudeMdExcludes keeps other files out.
Anthropic's docs put the limit plainly: Claude treats these files "as context, not enforced configuration." To block an action regardless of what Claude decides, use a PreToolUse hook.
Don't confuse CLAUDE.md with a hook
MCP servers connect Claude Code to outside tools; see our MCP guide for developers.

| Mechanism | What it is | Blocks an action? | Use it for |
|---|---|---|---|
| CLAUDE.md | Context you load every session | No | Conventions, build and test commands |
| Auto memory | First 200 lines or 25KB, per repo | No | Details carried between sessions |
| PreToolUse hook | Script that runs before a tool call | Yes, exit code 2 | Commands that must never run |
| Subagent | Built-in Explore, Plan or General-purpose agent | No | Read-only search, planning, multi-step tasks |
Exit code 2 does not block everywhere. On PostToolUse the tool already ran, and PermissionRequest does not honor it. The hooks docs list 33 events, including SessionStart, PreToolUse, PostToolUse and Stop. Hooks also cut cost: a hook can grep for ERROR and return only matching lines.
Pro and Max include it; the API bills per token
Claude Code shares the same usage limits as the rest of your plan. Prices are from Claude's pricing page, checked October 21, 2026.
| Plan | Price | Claude Code | Limits |
|---|---|---|---|
| Free | $0 | Not listed as included | n/a |
| Pro | $17 a month billed annually ($200 up front), or $20 monthly | Included | Rolling five-hour window plus weekly limits |
| Max | From $100 a month | Included | 5x or 20x more usage than Pro |
| Team and Enterprise | Check vendor page | Per-seat allowance | Rolling five-hour and weekly windows |
| API (Console) | Per token; check vendor page | Pay-as-you-go | Billed by token consumption |
For API billing, the costs docs give an enterprise average of about $13 per developer per active day. The same page gives $150-250 per developer per month, and under $30 per active day for 90% of users. On Pro and Max, usage is included in the subscription, so these per-token figures don't apply to your bill. Use /usage to check token use and /model to switch models.
Where Claude Code falls short
- Memory is not enforcement. Long or vague CLAUDE.md files reduce adherence.
- Agent teams cost more. They use about 7x more tokens when teammates run in plan mode.
- Background work uses tokens. Typically under $0.04 per session.
- Some surfaces cost extra. The desktop app needs a paid subscription. The JetBrains plugin needs the CLI installed separately.
For team policy beyond plan mode and hooks, see our guide to approval gates.
FAQ
Is Claude Code free? Not on the Free plan. Claude's pricing page lists it on Pro and Max; otherwise you pay per token with API credits through a Console account.
Does Claude Code support AGENTS.md? Yes. Claude can read a repo's AGENTS.md in place of CLAUDE.md. If both exist, it reads your CLAUDE.md files only. This needs v2.1.277 or later.
Can I stop it from editing files? Yes. Plan mode makes no edits until you approve. A PreToolUse hook that exits with code 2 blocks the tool call.
How is it different from the Claude chat app? Claude in chat answers questions. Claude Code works on your repo: it runs tests and opens PRs. Our complete Claude guide covers the rest of the family.
Next step: start with plan mode
Run claude --permission-mode plan on one real task. Add a short CLAUDE.md, then a PreToolUse hook for anything that must never run. To package repeatable instructions, read our guide to agent skills. Comparing options? Read our AI coding tools comparison.




