Skip to main content
A language model can reason about a task. To work on a real codebase, it also needs tools, context, a plan, and a way to decide what happens next. That surrounding system is the agent harness. This open-source guide builds an architecture through questions and answers. Each topic starts with a limitation, weighs the trade-offs, and introduces a component only when the simpler design breaks.
This is a system-design exercise inspired by Claude Code, not a description of its confirmed internals. Published figures retain their sources and caveats; worked examples are labelled illustrative.

Start learning

Start the walkthrough

Why isn’t a user and a model enough? Begin with repository access.

Explore the learning path

Fourteen topics covering tools, context, cost, planning, subagents, and synthesis.

Tool design deep dive

Essential tools answers which tools a basic coding agent needs, and compares them with Claude Code and Grok Build. Reading large files shows how an agent can inspect files that are too large for its context, with a proposed read contract and a worked investigation.

The mental model

Tools let the model act. The harness coordinates context, execution, and the next decision.

How the guide works

1

Ask a question

Start with the limitation of the current design.
2

Understand the trade-off

Read the explanation and diagram. Keep source-specific numbers and caveats in context.
3

Add the next component

Close with a concrete design decision, then follow the next question.

Check the evidence

The sources page distinguishes documented features, observations, third-party results, and illustrative reasoning. Preserve those distinctions when reusing or contributing to the guide.