How Claude Code Works
The documentation models Claude Code as an agentic coding assistant built around the agentic loop, where models reason, tools act, and the system repeats until work is verified or redirected.
The Main Loop
The page frames Claude Code as an iterative system that continually gathers context, acts with tools, and verifies outcomes.
Gather context
Claude reads files, searches the codebase, checks history, and loads instructions to understand the task and project state.
Take action
Claude edits files, runs commands, searches the web, or invokes other tools according to what it has learned.
Verify results
Claude runs tests, reads outputs, and adjusts its approach. You can interrupt or steer at any point.
Model layer
Sonnet is positioned for most coding tasks, while Opus is reserved for more demanding architectural reasoning.
Tool layer
Built-in capabilities cover file operations, search, command execution, web access, and code intelligence, with skills and subagents layered on top.
What Claude Can Access
The documentation emphasizes breadth: Claude does not just see a single buffer. It can work across the project, terminal, git state, and persistent instructions.
Project access
Claude can inspect files in the current directory tree and additional files with permission.
Terminal access
Anything you can do from the command line can potentially become part of the agentic workflow.
CLAUDE.md
Persistent project-specific rules and conventions should live here rather than only in conversation history.
Auto memory
Claude can preserve bounded cross-session learnings such as preferences and recurring project patterns.
Execution And Interaction
Execution environments and interfaces are separate concerns in the docs: the loop stays the same, but code can run in different places.
Local
Default mode with full access to your machine, files, tools, and environment.
Cloud
Anthropic-managed VMs for offloading tasks or working with repositories you do not have locally.
Remote Control
Your machine executes the work while you interact through a browser-based surface.
How To Work With Claude Code
The graph captures a practical HowTo layer for effective usage.
State the task and constraints clearly
Be specific up front and give Claude something concrete to verify against.
Let Claude gather context and act
Let the system search, read, and use tools before expecting precise implementation work.
Verify and course-correct
Tests, outputs, and intermediate results feed back into the loop and change the next step.
Manage context and safety
Use compaction, skills, subagents, checkpoints, and permissions to keep long sessions productive.
FAQ From The Knowledge Graph
The page is modeled with explicit Question and Answer nodes so its operational concepts can be navigated as structured knowledge.
Which models does the page highlight?
Sonnet is highlighted for most coding tasks, with Opus reserved for more demanding reasoning.
What categories of tools are built in?
File operations, search, execution, web, and code intelligence are the primary built-in categories.
Where can Claude Code run?
It can run locally, in Anthropic-managed cloud environments, or through Remote Control.
How are sessions stored?
Sessions are stored locally as JSONL files, enabling resume, rewind, and fork operations.