Claude Code started as a terminal tool. Today it runs in your editor, the desktop app, the browser, on your phone, in Slack and on CI servers, and on its own it brings Anthropic billions of dollars a year. Under every one of those screens sits a single piece: the harness, the layer of software that assembles context, hands tools to the model, runs what it asks for, checks permissions and loops until the job is done.
We put together a technical dossier on Claude Code from public sources. Here is the short version of how it works inside, in plain operations language, and what is worth borrowing for agents that do real work inside a company.
Where this comes from
We looked at version 2.1.310, released on October 23, 2026. Claude Code ships almost every week, so details such as the number of tools and events will drift.
What kind of harness it is
The short answer: a single model-driven loop that was born in the terminal. Nobody drew a flowchart of steps. On each turn the model reads the context, picks a tool, the harness runs it and returns the result, and the model decides what to do next. That repeats until it answers without asking for anything else.
- It searches the way an engineer does. Instead of indexing the codebase in a vector database, the agent searches by text and file name, opens what it finds and follows the trail. Less to keep in sync, and fewer answers made up from a snippet out of context.
- Memory lives in plain text files. Project rules sit in a CLAUDE.md file that loads at the start of every session. Anything worth keeping is written to a file, not to a hidden store.
- Context is built for caching. The start of the conversation (instructions, tools, rules) stays stable so it can be reused across calls, which makes every turn cheaper and faster.
- Control comes in layers. The model proposes, but the harness decides whether the action happens: permissions, hooks, a safety classifier and an operating-system sandbox.
The team’s technical thesis is “do the simple thing.” With each new model they delete harness code instead of adding it, because the model now handles on its own what used to need a workaround.
The tools: what the agent can do
The official reference lists dozens of built-in tools: read, edit and write files, run shell commands, search the web, fetch pages, manage tasks, call subagents. The shell is the tool that stands in for all the others, because it gives the model git, tests, builds and any program on the machine.
Whatever is not built in comes through MCP, the open connector protocol Anthropic itself created. An MCP connector links the agent to Notion, GitHub, a database or an internal system, each with a clearly defined set of actions.
Subagents: split the work, keep the context clean
When a task is large, the main agent can call subagents, each with its own clean context. There are built-in types (one that only explores the code, one that plans, a general-purpose one) and you can define your own with their own instructions and tools.
The win is organizational: the subagent reads twenty files, reaches a conclusion and hands back a summary. The main agent gets the answer without carrying all the search noise. It is the same as delegating research to a colleague and asking only for the report.
Hooks, permissions and sandbox: what keeps it from breaking things
- Permissions. Rules that allow, deny or ask for confirmation per tool and per path. You can block reading credential files or editing a whole folder, and the rule is enforced at execution time, not in the prompt.
- Hooks. Points in the lifecycle (before a tool runs, after an edit, at the end of a turn, when context is compacted) where a company plugs in its own code. A hook can run the formatter, write an audit log or block an action.
- Auto mode with a classifier. To work without asking at every step, a separate model judges whether each action is safe. It never sees tool output, precisely so outside content cannot talk it into anything.
- Operating-system sandbox. On macOS and Linux, commands run isolated, with network traffic going through a proxy. Even if the model gets something wrong, the damage stays contained.
None of these layers relies on the model remembering a rule. Agent safety is solved at the tool boundary, not in the prompt.
Long context without losing the thread
The newest models accept up to 1 million tokens of context, but long sessions still fill up. The harness compacts the conversation as it grows: it summarizes what happened and keeps what matters. The cache expires, so a session left idle for close to an hour is also compacted before it resumes, to avoid paying for the full context again.
For work that spans days, the recommended practice is the same as a good shift handover: a progress note in a file, with what was done, what was decided and the next action.
Why it turned into a huge business
Claude Code went from a side project in 2024 to one of Anthropic’s largest revenue lines. Reporting in February 2026 put it at $2.5 billion a year on its own. It is sold by subscription (Pro and Max for individuals, Team and Enterprise for companies) and by API usage.
The growth engine is simple: one harness serves every screen. Improve the loop and you improve the terminal, the editor, the app and the automation all at once.
What it teaches about agents in operations
The lesson is not just for developers. A good agent is a simple loop with a lot of careful work around it. When you put agents inside a company, the same pieces show up:
- Business rules written down in one place the agent always reads, not repeated in every request.
- Access to systems through connectors with well-defined actions, not loose passwords.
- Permissions and human sign-off at the right points, enforced at execution time.
- Subagents to split large work, and a reviewer that returns evidence.
- A record of everything, for audits and for picking up tomorrow.
That is exactly what a Forward Deployed Engineer builds inside your operation, once the AI Analyst has mapped the routine and the acceptance criteria. Code, reports, reconciliations, customer support and data entry are only examples. If a task repeats, it can be automated.
Claude Code shows that the secret of an agent that gets work done is not a complicated workflow. It is a simple loop and everything you build around it.
Enjoyed this article?
Get the next one before it hits the blog.
A short email per issue with what actually matters about AI agents at work. No spam.