← #claude-code

Claude Code: What Is Anthropic's Terminal-Based Coding Agent?

What It Is

Claude Code is a command-line coding agent developed by Anthropic, released in public beta in February 2025. It installs via npm (`npm install -g @anthropic-ai/claude-code`) and runs directly inside the developer's terminal, with no graphical interface in between. Unlike a code-completion assistant such as GitHub Copilot, Claude Code does not merely suggest lines of code: it reads a project's file tree, edits multiple files in sequence, runs shell commands, parses error output, and iterates until the requested task is resolved.

Under the hood, Claude Code is powered by Claude 3.5 Sonnet and Claude 3.7 Sonnet — the latter released in February 2025 — which introduced **extended thinking**, a reasoning mode that lets the agent explicitly decompose a problem before taking action. The tool is billed on consumption through the Anthropic API at Claude 3.7 Sonnet rates: $3 per million input tokens and $15 per million output tokens (Q1 2025 pricing). There is no flat-rate subscription specific to Claude Code outside of the Claude for Work offering, which bundled it starting in April 2025.

---

How It Works

Claude Code operates on a **perceive → plan → act → verify** loop. At each turn, the agent has access to a set of native tools: reading and writing files, executing bash commands, regex-based search across the repository, and spawning sub-agents via the `Task` primitive. That last capability enables parallelism: Claude Code can delegate the repair of one module to a sub-agent while continuing to analyze another file.

Working context is managed through a `CLAUDE.md` file placed at the root of the project. This file acts as persistent memory: naming conventions, build commands, business constraints. Without it, the agent starts from scratch every session. With a well-written `CLAUDE.md`, it immediately recovers context — for example: *"Always use pytest; never modify files under `/legacy/`"*.

**Concrete example.** Consider a Python repository with 40 files using the old `requests.get()` API without timeout handling. The command `claude "Add a 10-second timeout to every requests.get call in this repo, run the tests, and fix any failures"` triggers the following sequence: (1) recursive grep to locate occurrences, (2) file-by-file edits using `str_replace`, (3) execution of `pytest`, (4) reading tracebacks, (5) fixing broken tests. The whole process takes roughly 3 to 8 minutes depending on repository size, with no human intervention.

Permission management is explicit: by default, Claude Code asks for confirmation before any write or shell command. The `--dangerously-skip-permissions` flag disables these prompts — useful in CI/CD pipelines, risky in interactive development. Since version 0.2 (March 2025), a `--permission-mode=auto-edit` mode allows silent file writes while preserving confirmation for destructive shell commands (`rm`, `git push`, etc.).

---

Why It Matters Now

The problem Claude Code solves is specific: the friction between a developer's intent and multi-file execution. Completion tools (Copilot, Cursor in inline mode) operate file by file and leave the developer responsible for propagating changes, re-running tests, and interpreting errors. Claude Code shifts that burden to the agent. For a refactoring task touching 15 files, the time difference is measurable: benchmarks published by Anthropic in February 2025 show Claude 3.7 Sonnet reaching **70.3% on SWE-bench Verified** (autonomous resolution of real GitHub issues), compared to 49% for GPT-4o at the same date.

This positioning is particularly relevant for two profiles. First, solo developers and small teams without the resources to outsource technical debt: Claude Code can work through a backlog of minor bugs overnight in CI. Second, teams building automated software engineering pipelines — regression testing, dependency updates, documentation generation — where the agent slots in as a step in a GitHub Actions or GitLab CI workflow. In both cases, the value proposition is not code quality per se but the reduction of context-switching cost for the human engineer.

---

Key Players

**Anthropic** is the primary vendor with Claude Code, backed by Claude 3.7 Sonnet. **OpenAI** released Codex CLI in April 2025, a direct terminal-based competitor built on `o4-mini`. **Google DeepMind** is developing Jules (beta 2025), an asynchronous coding agent integrated with GitHub. On the IDE side, **Cursor** (VS Code-based) and **Windsurf** (by Codeium) offer agentic coding with graphical interfaces but without equally deep native shell access. The open-source library **Aider** (Python, MIT license, github.com/Aider-AI/aider) remains the reference for teams wanting a self-hosted coding agent compatible with multiple LLMs, including Claude 3.7 Sonnet via the Anthropic API.

---

Further Reading

Summary generated by Claude — human-verified