Harness Engineering: What OpenAI’s Agent-First Experiment Actually Teaches

ai
development
engineering
OpenAI claims they shipped a product with zero handwritten code and around a million lines generated by Codex. I read the full post and diagrams to extract the practical playbook: what to copy, what to avoid, and how to apply harness engineering in a normal team.
Author

WillzWayn

Published

March 23, 2026

The headline is not “AI wrote the code”

When people read OpenAI’s new engineering post, they usually focus on one line: 0 lines of manually-written code.

That line is provocative, but it is not the real story.

The real story is this: they changed the engineering bottleneck from typing code to designing a system where agents can reliably ship code. In their own framing, humans steer and agents execute.

If that sounds familiar, it should. It is the same direction many of us are already moving toward with spec-driven development, stronger repository docs, and tighter feedback loops. OpenAI just pushed it to an extreme and published what broke.


What they actually built (and what matters)

From the article, the most important concrete signals are:

  • They started from an empty repository in August 2025.
  • In about five months, they reached roughly one million lines of code.
  • They merged around 1,500 pull requests.
  • They report about 3.5 PRs per engineer per day (and increasing with team growth).
  • They claim about 10x speed versus fully manual coding.

Those numbers are impressive, but the mechanism is more interesting than the metrics.

They did not get there by writing better prompts in a vacuum. They got there by building an execution environment where the agent can:

  1. Understand architecture boundaries
  2. Access docs as system-of-record context
  3. Validate behavior with automated checks
  4. Observe UI/logs/metrics directly
  5. Iterate until review gates are satisfied

That full system is what I call the harness. The model alone is not the harness.

OpenAI also adds a subtle but important qualifier that many people miss: this setup worked because they invested heavily in repository structure, validation tooling, and feedback systems. Their own warning is that behavior at this level of autonomy should not be assumed to generalize without similar investment.


The shift in engineering role is real

The post is explicit: early progress was slower than expected, not because Codex was weak, but because the environment was underspecified.

That single line reframes the whole conversation. In an agent-first workflow, your leverage comes from:

  • defining boundaries
  • making context discoverable
  • instrumenting feedback loops
  • encoding standards into checks

So the day-to-day role shifts from “write this function” to “build a system where agents can write the right function, verify it, and recover when it fails.”


Diagram 1: Agent can see and drive the UI

Codex driving the app via Chrome DevTools MCP and rerunning validation loops

This image is basically “agentic QA as code.”

The key move is not visual testing alone. The key move is closing the loop: observe state -> trigger path -> observe again -> fix -> rerun. If your agent cannot see the UI, you are asking it to debug blind.


Diagram 2: Give the agent observability, not just stack traces

Local observability stack exposes logs, metrics, and traces to Codex

This is one of the strongest parts of the post.

Instead of only giving the agent red test output, they expose logs, metrics, and traces per worktree. That makes performance and reliability prompts actionable, not aspirational.

In plain terms: “Make startup under 800ms” only works when the agent can query the metric proving whether it succeeded.

Their implementation detail is worth stealing: observability is isolated per worktree and torn down after task completion. That gives each agent run a clean, task-scoped signal surface instead of shared noisy telemetry.


Diagram 3: If it isn’t in the repo, it doesn’t exist

Knowledge boundary: docs, chat, and tacit memory are invisible unless encoded in-repo

This image captures a painful truth most teams avoid.

If architecture decisions live in Slack threads, those decisions are invisible to future agents and usually invisible to future humans too. OpenAI’s answer is to treat repository knowledge as first-class and versioned.

Their specific takeaway is excellent: keep AGENTS.md short and use it as a map, not a giant encyclopedia.


Diagram 4: Speed requires hard architectural boundaries

Layered domain architecture with explicit cross-cutting boundaries

This is where “AI coding” turns into real software engineering.

They enforce allowed dependency directions with custom linters and structural tests. The point is not stylistic purity. The point is to keep high-throughput generation from collapsing into drift.

Without these constraints, faster generation usually means faster entropy.

One detail from the article that matters: they enforce not only architecture edges, but also “taste invariants” via custom lints (structured logs, schema naming, file size limits, platform reliability rules). They even tune lint error messages so remediation instructions enter agent context directly.


The 7 principles worth copying now

1) Treat AGENTS.md as a router, not a dump

Short, stable, and heavily linked beats long and stale.

2) Build progressive disclosure in docs

Give the agent entry points and indexes, then force navigation toward source-of-truth docs.

OpenAI describes this very concretely: the repository knowledge base should live in a structured docs/ directory that acts as the system of record, while a short AGENTS.md (around 100 lines) is injected into context as a map with links to deeper sources.

AGENTS.md
ARCHITECTURE.md
docs/
├── design-docs/
│   ├── index.md
│   ├── core-beliefs.md
│   └── ...
├── exec-plans/
│   ├── active/
│   ├── completed/
│   └── tech-debt-tracker.md
├── generated/
│   └── db-schema.md
├── product-specs/
│   ├── index.md
│   ├── new-user-onboarding.md
│   └── ...
├── references/
│   ├── design-system-reference-llms.txt
│   ├── nixpacks-llms.txt
│   ├── uv-llms.txt
│   └── ...
├── DESIGN.md
├── FRONTEND.md
├── PLANS.md
├── PRODUCT_SENSE.md
├── QUALITY_SCORE.md
├── RELIABILITY.md
└── SECURITY.md

In-repository knowledge store layout is not documentation theater here; it is operational infrastructure for agent reliability.

3) Convert taste into mechanical checks

If a rule matters repeatedly, encode it as lint, structural tests, or CI checks.

4) Increase legibility before increasing autonomy

If the agent cannot inspect state, reproduce failures, and verify outcomes, more autonomy just means faster mistakes.

5) Push review load agent-to-agent where possible

Human review should focus on judgment calls and product correctness, not low-level repetitive checks.

In their loop, Codex reviews its own PRs locally, requests additional agent reviews (local and cloud), responds to feedback, and iterates until reviewers are satisfied.

6) Keep throughput high with small, reversible PRs

When correction is cheap and frequent, waiting on perfect batches is usually the wrong optimization.

This is their merge-philosophy change: minimal blocking gates, short-lived PRs, and rapid follow-up fixes. Risk management shifts from “prevent every imperfect merge” to “detect and correct quickly at scale.”

7) Run ongoing garbage collection

Their “golden principles” cleanup loop is the right mental model: capture anti-patterns once, enforce continuously.

They literally describe this as garbage collection after discovering that humans were spending Fridays (20% of the week) cleaning AI slop manually.


What “agent-generated” includes (not just product code)

OpenAI defines agent-generated very broadly. Agents produce:

  • product code and tests
  • CI and release tooling
  • internal developer tools
  • docs and design history
  • evaluation harnesses
  • review comments and responses
  • repo-management scripts
  • production dashboard definitions

That scope is important because it explains their velocity compounding: once agents can improve the tools that improve the agents, the system starts reinforcing itself.


Their autonomy ladder (from one prompt)

The repository recently crossed a threshold where a single prompt can trigger an end-to-end loop:

  1. Validate repo state
  2. Reproduce a bug
  3. Record failure video
  4. Implement a fix
  5. Validate by driving the app
  6. Record resolution video
  7. Open PR
  8. Respond to human/agent feedback
  9. Remediate build failures
  10. Escalate only when judgment is required
  11. Merge

This is not “magic model behavior.” It is accumulated workflow engineering.


Where this breaks in normal teams

Most companies cannot copy this 1:1.

Not because of model quality, but because they lack the surrounding harness:

  • fragmented documentation
  • inconsistent architecture boundaries
  • brittle CI and flaky tests
  • weak observability in local dev
  • unclear ownership for doc freshness

If you copy only the “no handwritten code” slogan without building those capabilities, you get speed theater.

You can also break things by copying the wrong tradeoffs too early. For example, minimal blocking merge gates only make sense if your detection and rollback loops are already strong.


A practical adoption path (without dogma)

You do not need to ban manual coding to benefit from harness engineering.

Start with this sequence:

  1. Keep writing code normally, but tighten docs and architecture maps.
  2. Add mechanical invariants for boundary rules and reliability requirements.
  3. Make local environments agent-legible (UI + logs + metrics).
  4. Move routine review/repair loops to agents.
  5. Keep humans on prioritization, acceptance criteria, and edge-case judgment.

That path gives most of the leverage without the all-or-nothing constraint.

Once this is stable, add two high-leverage upgrades:

  1. Add a recurring doc-gardening/cleanup agent that opens small maintenance PRs.
  2. Track quality scores by domain/layer so “agent legibility debt” is visible and measurable.

What they are still learning (and why that matters)

The most honest part of the original post is the uncertainty section.

They still do not know:

  • how architectural coherence holds over years in fully agent-generated systems
  • exactly where human judgment yields the highest long-term leverage
  • how these practices should evolve as models improve

That honesty is useful. Harness engineering is not a finished framework. It is an active systems discipline.


Final take

Harness engineering is not prompt engineering with a new name.

It is the discipline of turning tacit engineering knowledge into visible, executable, enforceable systems so agents can produce reliable outcomes repeatedly.

In that world, the engineer’s job shifts up a layer: less typing, more system design. Less hero debugging, more feedback-loop design. Less “I know this in my head,” more “the repo can prove this is true.”

And honestly, that is probably a healthier way to build software anyway.

If I had to compress the whole article into one sentence, it would be this: agent capability scales with repository legibility, not just model quality.


Source

  • OpenAI, “Harness engineering: leveraging Codex in an agent-first world” (Feb 11, 2026): https://openai.com/index/harness-engineering/