Learning resourcesReviewed · Anthropic

How Claude Code works

How Claude Code works is an official documentation guide for developers who want to understand and control Claude Code, an AI assistant that runs in your terminal and can read files, edit code and run commands. It explains how the assistant reads projects, uses tools, manages conversation context and applies permission controls, including the limits of undoing its actions. It does not include installation steps or prices.

Researched 15 Nov 2026

In short.

How Claude Code works is a documentation guide for developers who want to understand and control Claude Code, an AI assistant that runs in your terminal and can read files, edit code and run commands across a project; it explains rather than demonstrates task results. It describes the cycle of gathering context, acting through tools and checking results, then explains project access, execution environments, session storage and permission modes. The most consequential limits it documents are that context compaction can lose instructions and checkpoints cannot undo changes to remote systems. Installation requirements, monetary costs, licensing terms and measured reliability are not established.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is the complete selected page at [https://code.claude.com/docs/en/how-claude-code-works.md], including its documentation-index notice and diagram descriptions. The linked documentation index, other pages, image files, external services and product implementation are excluded. Actual execution, performance, permission effectiveness and end-to-end task outcomes are not assessed.

The overview

Identity

This is the Claude Code documentation guide at [https://code.claude.com/docs/en/how-claude-code-works.md]. It explains the architecture and operation of an assistant that can read files, edit code and run commands.

The guide introduces both everyday controls and underlying concepts: how models and tools cooperate, what information enters a session, where commands execute and how users can interrupt or redirect work.

Assessment

The guide is useful for understanding what access Claude Code needs and how to supervise delegated work. Concrete commands, storage paths and rollback boundaries make it more informative than a general product introduction.

It does not provide a reproducible project exercise, benchmark, completed patch or observed test results. Its explanations support understanding the intended behavior; actual accuracy, speed and reliability are not assessed.

Users

Beginners can use the guide to understand why a coding assistant needs file access, terminal tools and repeated feedback. Familiarity with project directories, terminal commands and git will make the session and branch-management sections easier to follow.

Experienced developers will find details about worktrees, persistent instructions, context compaction, permission settings and extension boundaries. The page also describes uses beyond programming, including documentation, builds, file searches and research.

Capabilities

The guide groups tools into file operations, search, command execution, web access and code intelligence. These support coordinated changes across files, running tests and builds, inspecting git state and finding relevant documentation. Code intelligence features such as diagnostics, definitions and references require plugins.

It introduces skills for reusable workflows, MCP connections for external services, hooks for automation and subagents for delegated tasks. Terminal, desktop, IDE, browser, Slack and CI/CD interfaces are described, with the same underlying agent loop.

Using it

Requirements

Following the commands assumes an existing Claude Code installation. The page does not specify installation commands, supported operating systems, minimum hardware or account prerequisites.

The guide distinguishes local execution on your machine, cloud execution in Anthropic-managed or organization-operated environments, and Remote Control through a browser while execution stays local. External services and optional capabilities depend on configured extensions. Their setup and access requirements are outside this page.

Mechanism

Claude Code repeatedly gathers information, takes action and verifies results. A question may require only reading; a repair may involve repeated searches, edits and test runs. Tool results inform the model's next step, and the user can interrupt or provide corrections.

The model supplies reasoning, while the surrounding software supplies tools and manages context. The guide calls that surrounding layer an agentic harness. It describes Sonnet as suitable for most coding tasks and Opus as offering stronger reasoning for complex architecture, but supplies no comparative measurements. Models can be selected with /model or claude --model <name>.

Context includes conversation history, file contents, command output, project instructions, memory and loaded skills. Skills load on demand, while subagents work in separate context windows and return summaries.

Setup

The page starts from running claude in a project directory. It describes /init for generating a starter CLAUDE.md and /doctor for diagnosing installation or configuration problems, with possible fixes. Project instructions can live in CLAUDE.md; the page also says Claude can read a repository's AGENTS.md in its place.

Shift+Tab cycles permission modes. Auto uses background action review, Manual asks before edits and shell commands, Accept edits permits edits and common filesystem commands while retaining other prompts, and Plan explores without editing source files. Specific command permissions can be configured in .claude/settings.json.

The guide describes automatic memory and says the first 200 lines or 25KB of MEMORY.md, whichever comes first, load at session start. Detailed installation and extension configuration procedures are not included.

Example

The guide illustrates a request to fix failing tests. Claude may run the suite, read the failures, locate and inspect relevant source files, edit the code and run tests again. This shows how each result can change the next action.

The example is hypothetical. It includes no actual repository, failure log, patch or successful test output, so it establishes a possible process without establishing a successful repair.

Assessment & evidence

Limitations

Checkpoints snapshot files before edits, but their protection has boundaries. Restores skip symlinked and hard-linked files, and checkpoints cannot reverse actions affecting databases, APIs or deployments.

Context compaction can lose detailed instructions from earlier conversation. If a single file or tool output is so large that context refills immediately after each summary, Claude Code stops auto-compacting after a few attempts and shows an error. The guide recommends persistent project instructions and context inspection, without demonstrating that these prevent every failure.

Conversations, tool uses and results are described as being saved locally in plaintext JSONL files under ~/.claude/projects/. The page does not establish provider-side processing terms or complete retention rules. Permission-review effectiveness and isolation guarantees are also not assessed.

Reasoning

The guide's practical value is explaining the relationship between broad access, persistent state and user control. Project-wide file access and command execution explain how coordinated repairs are possible; context loss and limited rollback explain why reviewing changes and verification results remains important.

Its session details also support a useful distinction: resuming continues an existing session, forking copies history into a new session, and separate worktrees provide separate directories for parallel work. Switching git branches changes the visible files while retaining the conversation history, so conversation context can outlast the code state it originally described.

Alternatives

For procedural learning, the page points to Common workflows [https://code.claude.com/docs/en/common-workflows.md]. For prompting and verification advice, it points to Best practices [https://code.claude.com/docs/en/best-practices.md]. For choosing extensions, it points to Extend Claude Code [https://code.claude.com/docs/en/features-overview.md].

Those linked pages are outside the supplied evidence, so their contents and quality are not assessed. Apart from briefly contrasting Claude Code with inline code assistants that only see the current file, the guide names no competing products and gives no detailed comparison.

Evidence

The evidence is the complete supplied documentation page at [https://code.claude.com/docs/en/how-claude-code-works.md]. It contains architecture explanations, command examples, configuration references, diagram descriptions and hypothetical workflows.

Statements about model strengths, available interfaces and permission behavior are documentation claims. The supplied material contains no independent performance measurements, security evaluation or observed execution results.

Access & freshness

Costs

Monetary costs are unknown from this page. It gives no subscription prices, model rates, usage allowances or cloud-execution charges.

The guide discusses context consumption and links to token-reduction guidance. It explains that skills and subagents affect what occupies context, but provides no figures for estimating the cost of a task.

Rights

The supplied page contains no explicit licence or redistribution grant for its text or diagrams. Permission to redistribute those materials is not established.

Terms governing use of Claude Code and ownership or licensing of generated changes are not specified on this page.

Freshness

The supplied page was captured on 15 November 2026 at 02:57:29.779 UTC. Its publication and last-update dates are not stated, and it does not identify one product version governing every described feature.

One explicit version boundary concerns Auto permissions: the page says Auto is the built-in starting mode for interactive terminal and VS Code sessions from Claude Code v2.1.283 onward. For earlier versions, it describes that default only for Pro, Max, Ultra and Team plans. Applicability to a particular installation requires checking its version and settings.

Actions

Use the guide to understand where execution occurs, what the assistant can access and which permission mode matches the work you intend to delegate. For an existing installation, compare the documented version-dependent defaults with your actual settings.

Keep lasting project guidance in CLAUDE.md and use /context to inspect context usage. When delegating a change, specify the desired outcome and how to verify it, then review the resulting edits and verification evidence. Consult dedicated documentation for installation, pricing, service terms and extension setup.

Evidence for this report

selected-page.txtselected · checked 2026-11-15