Harness Engineering: Building Software Where Humans Steer and Agents Execute

openai · Tech · 2025 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: AI-assisted software engineering and coding-agent operations

OpenAI's harness engineering approach addresses how to make coding agents do production software work when implementation capacity is abundant, but human time, model attention, context windows, review capacity, and non-functional requirements remain scarce.

Constraints:

Architecture

The system turns the repository, CI, local tools, and collaboration process into a harness around coding agents. Tickets enter through Codex, skills teach the agent how to launch apps and observability tools, documentation and ADRs define what good looks like, lints/tests/review agents inject just-in-time instructions, repository architecture makes context local and uniform, and humans move from typing code to defining work, guardrails, acceptance criteria, and higher-leverage process improvements.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  human_engineer["Human engineer"] --> ticket_backlog["Ticket backlog"]
  ticket_backlog --> codex_entry_point["Codex entry point"]
  codex_entry_point --> skills_layer["Skills layer"]
  skills_layer --> local_app_harness["Local app harness"]
  skills_layer --> observability_stack["Observability stack"]
  local_app_harness --> chrome_devtools_and_daemons["Chrome DevTools and daemons"]
  codex_entry_point --> repository_architecture["Repository architecture"]
  documentation_and_standards["Documentation and standards"] --> review_agents_and_ci["Review agents and CI"]
  repository_architecture --> review_agents_and_ci
  observability_stack --> review_agents_and_ci
  review_agents_and_ci --> github_pr_workspace["GitHub PR workspace"]
  codex_entry_point --> github_pr_workspace
  github_pr_workspace --> human_engineer
  human_engineer --> garbage_collection_loop["Garbage collection loop"]
  garbage_collection_loop --> documentation_and_standards
  garbage_collection_loop --> review_agents_and_ci
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Human engineer Defines work, ranks priorities, writes process documentation, reviews plans when needed, and improves the harness rather than typing implementation code. Ticket backlog, Documentation and standards, GitHub PR workspace, Garbage collection loop
Ticket backlog Chunks features, reliability work, and product changes into units that agents can execute. Codex entry point
Codex entry point Primary development interface through which agents receive work, invoke tools, edit code, run tests, and propose PRs. Skills layer, Repository architecture, GitHub PR workspace
Skills layer Small set of maintained skills that teach agents how to launch applications, observability, Chrome DevTools, and local daemon-backed tools. Codex entry point, Local app harness, Observability stack
Local app harness Developer environment and app tooling designed for Codex to invoke from outside in. Skills layer, Observability stack, Chrome DevTools and daemons
Observability stack Local logging and telemetry surfaced to agents so they can inspect behavior while implementing and testing. Local app harness, Review agents and CI
Chrome DevTools and daemons Browser and local CLI control path that agents use to attach to applications and verify behavior. Local app harness, Skills layer
Documentation and standards ADRs, persona-oriented docs, QA plans, historical review feedback, and rules describing what good work looks like. Review agents and CI, Garbage collection loop, Human engineer
Repository architecture PNPM workspace, package boundaries, shared utilities, uniform implementation patterns, and file-size limits that shape agent context. Codex entry point, Review agents and CI
Review agents and CI Automated reviewers, lints, tests, source-code structure checks, security checks, and reliability checks that inject requirements and block severe issues. Documentation and standards, GitHub PR workspace, Observability stack, Repository architecture
GitHub PR workspace Collaboration surface where agents and humans exchange code review comments, PRs, feedback, and merge decisions. Codex entry point, Review agents and CI, Human engineer
Garbage collection loop Weekly process for observing slop, categorizing repeated failures, adding docs/checks, and eliminating the class of failure from future PRs. Documentation and standards, Review agents and CI, Human engineer

Data flow

A human defines or schedules a ticket, gives it to Codex with a small set of high-leverage skills, and lets the agent operate inside a repository designed for agent use. As the agent edits code, CI, custom lints, source-structure tests, review agents, QA-plan requirements, and PR comments inject the relevant standards at the point of need. Human review feedback is converted into documentation and automated checks during garbage-collection cycles, which reduces repeated slop and lets later agent runs self-correct.

3 supporting quotes
“the way me and my team work is to start with tickets, right? We have chunks of work that we want to do, features we want to add to our apps”transcript, stated
“we give that ticket to an agent along with a couple of skills that enable it to manipulate our app.”transcript, stated
“review agents that inject comments onto the PR that we require the agent to address before it is able to propose it for merge”transcript, stated

Why this architecture

The harness exists because models can produce abundant code, but they need timely, local, explicit instructions about quality, context, tools, and acceptance criteria. Instead of relying on human reviewers to remember every non-functional requirement, the team moves those requirements into docs, lints, tests, review agents, repo structure, and skills so agents receive corrective context while doing the work.

3 supporting quotes
“All the harness should do is surface instructions to the model at the right time.”transcript, stated
“It's really just about getting that right text, that right context to the agent at the right time.”transcript, stated
“taking the time to write some docs, write a lint that is bespoke to my code base”transcript, stated

Models used: GPT-5.2 · GPT-5.4 · Codex · coding agents · review agents · agent SDKs embedded in tests

Scale

Alternatives considered (roads not taken)

Let humans continue typing implementation code directly

Rejected because: The team intentionally banned direct editor use to force the workflow through agents and move human effort toward systems thinking and delegation.

“banning my team from even touching their editors to have to work through the models in order to get the job done.”transcript, stated
“skill sets are shifting more towards systems thinking, system design, and delegation”transcript, stated

Build a shell environment around Codex

Rejected because: The team made Codex the outside-in entry point and taught Codex how to invoke the app, observability, and tooling itself.

“we want the entry point to the development process to be Codex, not uh an environment which we build around it.”transcript, stated
“rather than like creating a shell that our app and Codex gets spawned into, we have a skill that teaches Codex how to launch the app.”transcript, stated

Create thousands of narrow skills

Rejected because: Tooling changes too quickly for humans to maintain broad skill sprawl, so the team centralizes leverage around fewer better skills.

“we kind of centralize our leverage around five to 10 skills.”transcript, stated
“we don't go super wide on skills preferring to make the existing skills better”transcript, stated

Front-load all instructions into the agent context

Rejected because: Front-loading overwhelms the agent and wastes scarce context, while just-in-time lints and tests provide requirements when they matter.

“You don't want to front-load all those instructions because then you kind of like overwhelm the agent.”transcript, stated
“figuring out ways to either defer or just-in-time surface those instructions is kind of what uh a good harness should do”transcript, stated

Use human code review as the main quality gate

Rejected because: At three to five PRs per engineer per day, humans became the blocker, so review personas, docs, tests, and lints moved review feedback into the harness.

“the reason PRs were staying open so long was because we needed code review. Uh because humans were being the blocker”transcript, stated
“we spun up a review agent that gets triggered on every push that says, "Is this code good?”transcript, stated

Approve agent-generated plans without deep review

Rejected because: Unreviewed plans can encode bad instructions, so the speaker recommends plan-only PRs with line-by-line human review if plans are used.

“if you do use a plan and you approve it without reading it at all, you're actually encoding a bunch of instructions that you don't necessarily want followed.”transcript, stated
“push those up as single PRs with just the plan where you actually have human review every line of it”transcript, stated

Patterns

context-engineering (proposed harness discipline)

The case treats context as an engineered scarce resource: instructions are deferred, refreshed, injected through lints/tests/review agents, and encoded into repo structure so agents see the right text at the right time.

“context is a thing that I don't think will ever be obsoleted, right? Like, the the models must be told like the requirements of the task”transcript, stated
“getting that right text, that right context to the agent at the right time.”transcript, stated

tool-use-orchestration (agent tool harness)

Codex is given skills and local tools for launching apps, observability, Chrome DevTools, daemons, tests, and PR workflows rather than being treated as only a code generator.

“a skill that teaches Codex how to launch the app. That teaches Codex how to spin up that local observability stack”transcript, stated
“boot up Chrome dev tools and attach to the application with a, you know, local CLI that will connect via some daemon”transcript, stated

eval-driven-development (automated quality gates)

The team converts recurring review feedback into lints, tests, QA-plan expectations, source-structure checks, and reviewer agents that run during CI and PR workflows.

“having reviewer agents look at the code along the way through the lens of what it means to be successful”transcript, stated
“write a lint that is bespoke to my code base that is going to look at every time I call fetch”transcript, stated

observability-tracing (agent-operable development environment)

The skills and local harness expose logging, telemetry, and browser/devtool inspection so agents can validate behavior while they work.

“spin up that local observability stack to give it logging and telemetry.”transcript, stated
“attach to the application with a, you know, local CLI that will connect via some daemon”transcript, stated

human-in-the-loop-gate (review and plan approval)

Humans move out of routine implementation but still review high-leverage artifacts such as plans, process definitions, priorities, and quality standards.

“take the human input to rank what is most important, success metrics, reliability metrics, give it to the machines”transcript, stated
“have human review every line of it and like block on human approval before they get merged and then kicked off.”transcript, stated

safety-policy-enforcement (non-functional requirement enforcement)

Security, reliability, package privacy, dependency edges, PII controls, retry/timeout rules, and other non-functional requirements are converted into durable automated checks.

“security and reliability review agents in our code base that are continually running as part of every push in CI”transcript, stated
“I am making sure that we don't have any PII leaking in the logs in production”transcript, stated

Tradeoffs

Force software work through agents.

Chose Human steering and agent execution over Human engineers directly editing implementation code.

Rationale: The team wanted to operationalize agent capacity and move humans toward systems thinking, delegation, and defining quality.

“banning my team from even touching their editors to have to work through the models”transcript, stated
“skill sets are shifting more towards systems thinking, system design, and delegation”transcript, stated

Use just-in-time context delivery.

Chose Deferred instructions through lints, tests, and review agents over Loading all standards at the start of the task.

Rationale: Just-in-time delivery preserves context and gives agents constraints after they have enough task understanding to apply them.

“You don't want to front-load all those instructions because then you kind of like overwhelm the agent.”transcript, stated
“at lint or test time, say, "Okay, you've done the work. In order to finish it, you have to break this apart”transcript, stated

Concentrate skills.

Chose Five to ten maintained skills over Thousands of narrow skills.

Rationale: Fewer, better skills hide changing infrastructure behind stable human-invoked interfaces while letting Codex adapt to details.

“we kind of centralize our leverage around five to 10 skills.”transcript, stated
“we hide all that complexity beneath the skills that the human has to invoke and let the agent just kind of figure it out.”transcript, stated

Architect the repository for agent locality.

Chose Many packages, package privacy, shared utilities, and uniform implementation patterns over A simpler broad repository where agents must infer boundaries repeatedly.

Rationale: Package boundaries and uniform code make the relevant directory subtree and expected token patterns more predictable to agents.

“750 packages in the PNPM workspace, isolated by business logic domain or layer of the stack”transcript, stated
“making the code as much the same as possible kind of makes it so that regardless of where in the repository your agent is looking”transcript, stated

Bias PR collaboration toward throughput.

Chose Agents and humans can acknowledge, defer, or reject feedback over Every review comment must be addressed before progress.

Rationale: The system tries to avoid agents being boxed in by reviewers and instead biases toward accepted, functional code.

“The implementation agent can acknowledge, defer, or reject any feedback that it gets.”transcript, stated
“When really we want to bias toward code being accepted, not perfect, not drowning in minutia”transcript, stated

Spend tokens across the whole delivery system.

Chose Planning/documentation, implementation, and CI all consume substantial token budget over Using tokens mostly for code writing.

Rationale: The speaker frames getting code accepted and advancing the product as the expensive part, not merely producing implementation.

“it's probably a third a third a third between like planning, ticket curation, documentation, implementation, and stuff that runs in CI.”transcript, stated
“writing code no longer is the hard part. Like getting code accepted and advancing the code and product forward”transcript, stated

Gotchas (what bit them)

Telling agents not to produce slop is not enough.

Root cause: Quality depends on specifying hundreds of implicit non-functional engineering decisions that models have seen many possible versions of during training.

Resolution: Observe repeated slop, document the desired standard, and put guardrails, lints, tests, and review agents in place.

“To do a single patch well probably requires 500 little decisions along the way around the underspecified non-functional requirements”transcript, stated
“Put the guardrails in place so they stop making those mistakes.”transcript, stated

Context pages out during long agent work.

Root cause: Auto-compaction and long-running tasks mean agents may lose earlier instructions unless the harness refreshes requirements.

Resolution: Use review agents, lints, tests, and just-in-time feedback to continually resurface the right context.

“context will get paged out over time. We need to be continually refreshing context as the agent goes about doing a task.”transcript, stated
“reviewer agents look at the code along the way through the lens of what it means to be successful”transcript, stated

Humans are inconsistent at remembering non-functional requirements.

Root cause: Reviewers forget or inconsistently enforce requirements such as retries, timeouts, secure interfaces, and source-code structure.

Resolution: Encode those requirements in bespoke lints, tests, and CI checks that run on every change.

“I am not a reliable reviewer or author of code with respect to this non-functional requirement.”transcript, stated
“means I've durably solved this problem and I'm able to do it cuz I lean on this axiom that code is free”transcript, stated

Too many skills create maintenance drag.

Root cause: Local developer tools and repository infrastructure change too frequently for humans to track many narrow skills.

Resolution: Centralize leverage around five to ten skills and improve those instead of going wide.

“the infrastructure within the repository, all the local developer tools, change super frequently”transcript, stated
“we kind of centralize our leverage around five to 10 skills.”transcript, stated

High agent throughput can make merge conflicts and human review the bottleneck.

Root cause: Several engineers producing multiple large PRs per day kept PRs open long enough for conflicts to accumulate.

Resolution: Restructure the code, shorten PR open time, automate review personas, and remove repeated human review bottlenecks.

“with each engineer producing three to five PRs per day, even on a team of three, merge conflicts were super miserable”transcript, stated
“minimize the amount of time PRs were open so that we were uh reducing the likelihood of a merge conflict actually occurring.”transcript, stated

Plans can become harmful instructions if approved casually.

Root cause: A plan that nobody reads can encode bad rollout instructions that the agent will faithfully execute.

Resolution: If plans are used, treat them as reviewable PR artifacts and block execution until humans approve the plan line by line.

“if you do use a plan and you approve it without reading it at all, you're actually encoding a bunch of instructions that you don't necessarily want followed.”transcript, stated
“push those up as single PRs with just the plan where you actually have human review every line of it”transcript, stated

New lifecycle phases start at zero even after code generation works.

Root cause: QA, smoke testing, PII review, user-ops runbooks, and production issue triage require their own docs and tools.

Resolution: Write acceptance criteria and build agent-usable tools for each new software lifecycle capability as it emerges.

“The agents' ability to do like QA smoke testing on our built artifacts before they're promoted to distribution was weak.”transcript, stated
“There were no docs, there were no tools that the agents could use to like download the built artifact, launch it, poke around”transcript, stated

Evaluation

The team evaluates the harness by tracking where human attention is still required, whether PRs merge without slop or conflict, whether non-functional requirements are automatically enforced, whether agents can continue until tests are green, and whether more of the software lifecycle can be delegated through documented acceptance criteria.

Metrics: nine months of agent-only software building · three to five PRs per engineer per day · 750 PNPM packages · file-size tests enforcing no more than 350 lines · five to ten core skills · over one billion output tokens per day · roughly one-third tokens each across planning/documentation, implementation, and CI · goal state of 50 agents running 24/7 without interaction

3 supporting quotes
“with each engineer producing three to five PRs per day, even on a team of three, merge conflicts were super miserable”transcript, stated
“Every time I have to type continue to the agent is like a failure of the harness to provide enough context”transcript, stated
“with that and just continuously appending to these files, we started to see slop reduce, reduce, reduce.”transcript, stated

Outcomes

The source reports a nine-month agent-only workflow, over a billion output tokens per day, three to five PRs per engineer per day, 750 PNPM packages, five to ten core skills, 350-line file limits, and an aspirational goal of 50 agents running 24/7.

3 supporting quotes
“for the last 9 months, I have had the privilege of building software exclusively with agents.”transcript, stated
“we started to see slop reduce, reduce, reduce.”transcript, stated
“I'm able to take a token budget and a quarter, a half, or a year's worth of work”transcript, stated