← All writing

Working with Agents · Part 2 of 3

The New Compiler and the Loop

A model is a stateless zip file of the internet. Put it inside a harness while-loop and natural language becomes a compiler, shifting your job from typing code to intent, planning, and review.

An exploded technical drawing for The New Compiler and the Loop

When ChatGPT launched at the end of 2022, language models lived in an isolated text box. You typed a prompt, got back a block of code from text la-la land, pasted it into your editor, found out it called a flag that didn't exist, and pasted the stack trace back into the browser. You were the runtime, the file system, and the loop.

Today the model is no longer trapped in a chat tab. It sits inside a harness: a cognitive environment with tools to read files, run compilers, inspect browsers, and spawn fresh workers. Once the model can interact with reality directly, the way humans build software changes at the root.

Natural language is the new compiler

In January 2023, Andrej Karpathy posted a line that became famous: “The hottest new programming language is English.” Two years later, in his Software Is Changing (Again) talk at Y Combinator, he gave that shift a version number: Software 1.0 is hand-written code, Software 2.0 is neural network weights, and Software 3.0 is natural language programming LLMs.

Human language is the most natural medium we have ever evolved to represent ideas and share our reality. For seventy years of computing, the tax on building software was translating those ideas by hand into rigid machine syntax before you could see if the idea even worked. Now we have a Natural Language Interface (NLI) compiler that translates human intent into programming languages, migrations, tests, and diffs.

The barrier to entry for software engineering has dropped to the floor—while the ceiling for expressive, idea-driven thinkers has never been higher.

Someone who thinks clearly in systems, articulates sharp intent, and runs a disciplined agentic loop can now out-build a traditional 2010s programmer typing every line by hand. The bottleneck is no longer how fast your fingers emit syntax. It is how clearly you specify what should exist and how you verify that it works.

2022 · ISOLATED TEXT BOXYou promptIsolated chat tabYou copy, paste, test,and paste errors back2026 · NLI COMPILER + HARNESS LOOPYour intentplan + reviewHarness while-loopmodel + tools + state on diskRealityfiles · tests · browser
In 2022, you were the glue between the text box and reality. In a harness, the loop touches reality directly and returns a verified result.

A lossy zip file of the internet

In Intro to Large Language Models, Karpathy describes pretraining as compressing terabytes of web crawl roughly 100x into model parameters: a lossy zip file of the internet. Inside a frontier model's weights sit millions of websites, documentation pages, RFCs, open-source repositories, and architectural patterns.

No single human engineer could ever hold that breadth of the internet in working memory. And with every generation of models, more solution architecture and systems design gets baked directly into those weights. If the jump from 2022 to 2026 took us from single-function autocomplete to multi-file repository engineering, imagine what those weights will know in another two to three years.

Yet for all that compressed world knowledge, a model is still stateless intelligence. As Zaharia et al. (2024) point out in their work on Compound AI Systems, reliability comes from pairing the model with the surrounding system:

  • In the model's weightscompressed world priorMillions of websites, languages, library idioms, and software architectures—a lossy zip file of the public internet.
  • Missing from the weightsyour local realityYour repo's current state, the decision your team made on Tuesday, whether the last migration ran, and what "done" means for this ticket.
  • The harness's jobcognitive environmentBridge the two: give that stateless intelligence eyes, hands, context on disk, and ground-truth checks (Yang et al., 2024).

One while loop is a dynamic workflow compiler

When teams first tried to build agents in 2023, they built rigid node-and-edge graph frameworks: a Planner Node wired to a Coder Node wired to a Tester Node. Those fixed graphs broke the moment a real task needed a different shape of work.

As Anthropic's engineering team noted in Building Effective Agents, the most capable coding agents use a much simpler runtime: one flat while loop extending the ReAct (reason + act + observe) pattern.

This also connects directly to what researchers call Compound AI Systems (Zaharia et al., 2024; Chen et al., 2025; Lee et al., 2025). Formally, any compound system can be written as Φ = (M, C, X, Y): a set of specialized language modules M (each with its own prompt/skill, model weights, and schema) governed by control-flow logic C. When C is hardcoded in Python, you have a static pipeline. When C is driven dynamically at runtime by a harness while loop, the compound system becomes an agent.

Each turn, the harness assembles context, calls the model, executes whatever tool calls came back, appends the observations, and repeats until the stop condition holds. Because the model chooses which primitive to call next based on what just happened, that single while loop acts as a dynamic workflow compiler on demand.

OUTER HARNESS · WHILE (NOT STOPPED)01 · THINKReasoningiterate in-turn02 · PLANTodo / Specshape the flow03 · ACT & TESTEdit + Verifycompiler / pytest04 · REVIEWSubagentfresh contextcounterexample or test failure => iterate on the step automaticallynext step in the dynamic flow until all checks pass
No rigid graph required: the same while-loop runs a 1-turn rename or dynamically compiles a multi-step plan, repair, and fresh-context review flow.

Without extra machinery, the loop can iterate on every step at three nested layers to raise output quality:

  • Inside reasoning => drafting and critiquing an approach in thinking tokens before touching a file.
  • Against reality => running tests, typechecks, or a browser check after an edit and repairing until green.
  • Across fresh context => spawning a read-only review or verifier subagent that hasn't been anchored by the last twenty turns of generation.

Context distribution, dynamic decomposition, and multiple perspectives

A single model instance has one finite context window—and worse, one attentional frame. Stuff thirty file reads, grep dumps, and failed stack traces into a single session and the model starts missing details buried in the middle (Liu et al., 2023) while anchoring on its own first hypothesis.

When spawning a subagent is just another tool call inside the harness while loop, the parent loop becomes an adaptive, dynamic task decomposer. Instead of guessing a static task graph before reading a single file, the orchestrator inspects the codebase first, splits the work as it discovers the real boundaries, and distributes context across multiple isolated LLM instances.

Adaptive Task Decomposer (Parent Loop)clean context window · routes scoped slices · synthesizes resultsscoped context indistilled verdict outINSTANCE A · EXPLOREParallel Searchreads 40 files in isolation;returns 15-line file:line mapINSTANCE B · WORKERScoped Slicegets only target module + spec;iterates until tests passINSTANCES C & D · CRITICSMultiple Perspectivesskeptic, simplicity & reviewerunanchored by generator's turnsEach instance runs its own clean context window; noisy intermediate logs never pollute the parent.
Agentic orchestration is context distribution: decompose on demand, isolate the noisy work, and combine independent perspectives.

Distributing work across multiple instances buys you three things a single monologue cannot:

  • Context hygiene through isolation => an explore agent can read forty files and burn 80,000 tokens of search noise in its own disposable window, then hand the parent orchestrator a 200-word conclusion. The parent's context stays sharp for architectural decisions.
  • Adaptive task decomposition => when a task fans out across three independent modules, the parent splits them into parallel subtasks on the spot (Kim et al., 2025); when steps depend on each other, it runs them sequentially with verified handoffs.
  • Multiple perspectives beat one => a model reviewing its own code in the same context window rationalizes its own shortcuts. Spawning separate instances with distinct lenses—an adversarial review agent checking only the diff and spec, or a consensus panel of pragmatist, skeptic, and simplicity perspectives debating a design (Du et al., 2024)—catches blind spots that a single trajectory misses.

In production harnesses (like Claude Code and Lauren Tan's pstack), this multi-agent context distribution takes three repeatable shapes: Swarm (splitting a broad job across disjoint slices for horizontal coverage), Arena (sending the same brief to competing models in isolated worktrees and folding the best ideas into the strongest base), and Interrogate / Consensus (unanchored multi-perspective review with an explicit dismissed bucket so reviewer nitpicks don't cause over-engineering).

Token leverage: automating the return prompt

Watch how people interact with a coding agent when they have no harness setup. They type a prompt, wait forty seconds, read the output, type “now run the tests,” wait again, type “fix that import error,” and repeat twenty times. That is Level 1: the human is the return prompt.

Every time you manually nudge the agent to take the next obvious step, you are spending human actions on work the harness should automate. As SWE-agent (Yang et al., 2024) showed with Agent-Computer Interfaces (ACI), when the environment automatically returns structured lint, test, and compiler feedback, the agent resolves far more issues on its own. The metric that matters is useful tokens (and verified work) per human turn.

L1 · MANUAL NUDGINGYou are the loop20+ human prompts / taskL2 · HARNESS CHECKSTools return promptstests & linters drive repair3–5 human turns / taskL3 · FULL LOOPPlan · Act · Reviewskills, hooks & sub-reviews1–2 human checkpointsmore verified tokens per human turn · less human babysitting
  1. L1

    Prompt engineering in the raw. No harness rules, no verification commands. You manually prompt every step, copy errors, and remind the model to check its work. High human actions, low token leverage.

  2. L2

    Automated return prompts via tools. Give the agent a test command, a typechecker, and repo rules in CLAUDE.md or AGENTS.md. When an edit breaks a test, the harness returns the failure automatically and the agent iterates until it passes.

  3. L3

    Autonomous plan–execute–review flows. Package your workflow into skills, hooks, and fresh-context review subagents. One human prompt triggers planning, implementation, test verification, and an independent diff review before handing the result back to you.

Where human cognition moves

When you stop acting as a manual return-prompt router, your attention frees up for the parts of engineering that cannot be delegated to a compressed snapshot of the public internet:

StageWho owns itWhat happens
1. Intent & IdeationYouDecide what problem is worth solving, why it matters, and what product and taste boundaries apply.
2. Plan & ArchitectureYou + AgentCo-design the spec and tradeoffs on disk before touching implementation files.
3. Execution & RepairThe Harness LoopCompile intent into code, run tests, inspect failures, and iterate until checks pass.
4. Review & AcceptanceYou + Fresh VerifierInspect the rendered diff, verification receipts, and assumptions before merging.

That is the shift at the heart of agentic engineering. Stop spending your turns babysitting syntax and manually nudging the next step. Automate the return prompts in the harness, let the while loop compile and verify the workflow, and keep your cognition on intent, architecture, and review.

Try it this week

Measure your own return-prompt tax on your next feature:

  • Count how many times you type a follow-up prompt that only says “run the tests”, “fix that lint error”, or “check the edge cases”.
  • Move those exact checks into your repo's AGENTS.md / CLAUDE.md or a pre-finish review skill so the loop runs them before returning to you.
  • Spend your human turns on two moments: approving the plan before edits start, and reviewing the verified diff at the end.

Sources & references

Working with Agents · the series

  1. Part 1Everything Is Context
  2. Part 2The New Compiler and the Loop · you’re here
  3. Part 3The Self-Evolving Harness