What happens between your prompt and the code change —
and why the harness matters more than the model
Navigate with ← → arrow keys, click the arrows, or swipe
Weekly insights on AI coding and agent architecture. No spam.
Just use Claude Opus and give it a terminal. Same thing.
✓ RealityClaude Code = Opus + an agentic harness that gives it tools, memory, and a feedback loop.
You paste code into the chat, Claude responds with text suggestions, you manually copy the changes, paste them back, run the tests yourself, then paste failures back in — forever.
Claude reads your files directly, edits them in place, runs your tests, sees the failures, fixes them — and only tells you when it's done. You never copy-paste anything.
Before Claude writes a single line of code, the harness assembles a layered context that tells it what it can do, what it knows, and how to behave.
This is why CLAUDE.md matters so much — it's injected into every single API call. The model sees it before your message. It's not a config file you set once; it's part of every conversation.
The harness doesn't just pass your message to the model. It assembles this entire context, sends it as one API call, receives the model's response (which might include tool calls), executes those tools, then sends the results back — in a loop.
Three phases that blend together — Claude decides what each step requires based on what it learned from the last one.
Without tools, Claude can only respond with text. With tools, Claude can ACT. The harness gives Claude five categories of action:
Each tool call gives Claude new information that informs the next step.
The model provides intelligence. The harness provides the senses, hands, and memory to act on it.
Claude Code serves as the agentic harness: it provides the tools, context management, and execution environment that turn a language model into a capable coding agent.
LLM performance degrades as the context window fills up. The harness manages this so you don't have to.
The harness auto-compacts, clears stale tool outputs, and summarizes history when the window fills.
The model forgets everything between sessions. CLAUDE.md is what the harness loads at the start of every conversation — your project's persistent memory.
Without it: every session starts from zero. With it: Claude knows your project from the first message.
The harness is an orchestrator, not just a wrapper. It can load knowledge on demand and spawn fresh instances for complex work.
Structured knowledge packets loaded only when relevant. A "git workflow" skill, a "testing conventions" skill — each injected into context only when needed. Saves precious context space for everything else.
Spawn a fresh Claude instance with its own context window for a subtask. Their work doesn't bloat your main session. They return a summary when done. Perfect for parallel work or long sub-tasks.
Why this matters: A subagent writing tests for 10 files uses its own 200K context — not yours. You get the results back as a tidy summary. The harness handles the orchestration automatically.
The harness controls what Claude can and can't do. Autonomy comes with guardrails built in.
Asks before every file edit and shell command. You approve each action. Maximum control, slower workflow.
File edits happen freely. Still asks before running shell commands. Good balance of speed and safety.
Read-only. Claude explores your codebase and produces a complete plan for you to review before any changes.
Every file edit is checkpointed. You can rewind to any previous state — like a git undo for the entire session.
Define which shell commands are always allowed, which always need approval, and which are blocked entirely.
| Capability | Just Opus | Claude Code |
|---|---|---|
| Codebase access | You paste code manually | Reads your entire codebase |
| File edits | You copy output back | Edits files directly |
| Workflow | One-shot Q&A | Multi-step autonomous work |
| Memory | Gone between messages | CLAUDE.md + auto-compact |
| Verification | You check everything | Runs tests, self-corrects |
| Context | Single shared context | Subagents with independent contexts |
Now that you understand the pattern, you can build domain-specific agents for your use case. Here's the recipe:
Claude Code isn't magic. It's a well-designed harness. You can build the same pattern for any domain.
This is the skeleton of every agentic harness. Claude Code, Cursor, Copilot — they all follow this loop.
model.chat for any LLM with tool use.
The harness pattern — tools + loop + memory + guardrails — is the blueprint for every useful AI agent, not just coding ones.
Same engine. Radically different cars.
Weekly insights on AI coding, agent design, and building in public.
No spam. Unsubscribe any time.
From Basil AI · Privacy Policy