HN Debrief

Harness engineering for self-improvement

  • AI
  • Developer Tools
  • Programming
  • Open Source

The post is about "harness engineering" for agents. That means everything around the model rather than the model itself: prompts, tool choices, memory files like AGENTS.md, workflow structure, evaluators, and the runtime that lets an agent inspect failures and modify its own setup. The core claim is that a lot of the next performance gain will come from iterating on that outer loop instead of only chasing better base models.

If you use coding agents seriously, stop treating the prompt and tool stack as fixed. Instrument the harness, build repo-specific evals, and cut context aggressively before you spend more on bigger models or more elaborate agent scaffolding.

Discussion mood

Positive but practical. People liked the framing because it matches what they are seeing with coding agents, but the enthusiasm was tempered by a lot of scar tissue around bad evals, reward hacking, bloated context, and the sheer mess of making results reproducible on real codebases.

Key insights

  1. 01

    Agent retros surface missing harness pieces

    Treating the agent like a teammate at the end of a session turns up useful harness bugs you would otherwise miss. People reported asking for a retro exposes failed tool calls, confusing docs, hidden invariants, small bugs, missing lint rules, and ideas for new scripts or skills. That makes harness improvement less theoretical and more like continuous process cleanup.

    Add a short end-of-session prompt that asks the agent what slowed it down and what should change for the next run. Store the answers somewhere durable so they can become tools, docs, or checks instead of disappearing into chat history.

      Attribution:
    • AlexErrant #1
    • karl_gluck #1
    • dr_dshiv #1
  2. 02

    Quiet tools and indexing cut waste fast

    The biggest cost and quality improvements did not come from exotic prompting. They came from suppressing noisy terminal output and giving the agent a codebase index through codebase-memory-mcp, which reduced full file reads and sped up understanding. That changes both token spend and the model's chance of getting lost.

    Audit your tool outputs before you redesign the whole harness. If your agent is reading giant command dumps and entire files to recover simple facts, fix that first.

      Attribution:
    • jtr1 #1
  3. 03

    Auto-research works on small harness targets

    Letting agents inspect lots of production traces and build helper tools can pay off, but only when the optimization target is narrow enough to search. The useful unit was not a million-line application. It was a lighter harness layer like a skill pack or runtime wrapper, paired with synthetic users, synthetic tools, and proper train versus validation splits.

    Point automated harness tuning at a bounded subsystem with clear interfaces. If the target is your whole codebase, break off the harness component first or the search space will swamp any signal.

      Attribution:
    • scosman #1
  4. 04

    Good evals are the bottleneck

    Public coding benchmarks were treated as weak proxies for private repo work, either because they are contaminated, saturated, or just not representative. The sharper point was that even private evals fail if they only reward passing tests or expose a single scalar target. People called out hidden missing checks, weak coverage, and agents that exploit the metric rather than improve the code. Human review or rubric-based grading still has to sit beside executable tests if you care about maintainability.

    Build repo-specific evals with fail-closed checks, then add a second quality signal for readability and standards. If you optimize against one narrow pass metric, assume the agent will learn to game it.

      Attribution:
    • bisonbear #1
    • sulam #1
    • tosh #1
    • gopalraja #1
    • datadrivenangel #1
    • bob1029 #1
  5. 05

    Cut default context, keep conditional guidance

    The useful simplification pattern was not "delete all guidance." It was to strip the always-loaded prompt and move lower-frequency rules into small referenced docs that can be pulled in on demand. That preserves coding standards and environment instructions without flooding every run with tokens and distractions.

    Split your harness instructions into always-on essentials and opt-in reference docs. Then test whether the agent can fetch the right guidance instead of forcing every policy into every prompt.

      Attribution:
    • bisonbear #1
    • GrinningFool #1
    • tosh #1
  6. 06

    Custom harnesses are a control play

    People building their own harnesses are not mainly chasing novelty. They want stable workflows, transparent prompts, portable behavior, and insulation from vendor changes in hidden system prompts or pricing. The argument was that generic harnesses are becoming commodity, while closed vendor harnesses try to create lock-in by controlling the runtime, the prompt, and sometimes even visibility into what the agent is doing.

    If agents are becoming part of your development workflow, treat harness portability as a product requirement. Avoid setups where a model upgrade or pricing change silently rewrites how your team works.

      Attribution:
    • sbysb #1
    • anon373839 #1
    • pornel #1

Against the grain

  1. 01

    Manual agent retros do not scale

    Having explicit retros with an agent may work for early adopters, but it sounds like busywork if it remains a custom ritual. The pushback was simple. People want the learning loop baked into tools so they spend less time talking about the harness and more time getting work done.

    If you add reflection steps, make them lightweight and automatable from day one. Any harness practice that depends on disciplined manual chat habits will be hard to spread across a team.

      Attribution:
    • jagenabler2 #1
  2. 02

    Human-in-the-loop may improve faster

    The assumption that self-improving harnesses should minimize human involvement was challenged directly. Even if autonomous improvement works, a human steering the loop may raise the improvement rate more than a fully closed system can, especially while the models are still unreliable judges of their own progress.

    Do not optimize for full autonomy too early. Keep a human review path in the loop if the goal is faster improvement rather than a cleaner demo.

      Attribution:
    • kimjune01 #1
  3. 03

    This resembles old expert systems

    One skeptical reaction was that the whole exercise looks like a reinvention of ontologies and expert systems under new branding. That does not erase the gains people are seeing, but it reframes harness engineering as structured knowledge and workflow design more than a mysterious new discipline.

    Borrow ideas from older rule-based and knowledge-system tooling when designing harnesses. Some of the hard problems here may already have useful patterns, even if the model layer is new.

      Attribution:
    • sim04ful #1

In plain english

AGENTS.md
A repository file used to give coding agents persistent instructions about the project, workflow, or conventions.
benchmark
A standard set of tasks or tests used to compare systems on the same problem.
codebase-memory-mcp
A tool mentioned in the comments that provides indexed access to a codebase so an agent can retrieve relevant information without reading whole files.
evals
Evaluations, meaning the tests, tasks, and scoring methods used to measure model or agent performance.
fitness function
A scoring rule used to judge how well a candidate solution performs so it can be compared and improved.
harness
The surrounding software and instructions that shape how an AI model works on a task, including prompts, tools, memory files, workflow logic, and evaluators.
MCP
Model Context Protocol, a way for AI agents to connect to external tools and data sources through a standard interface.
recursive self-improvement
A process where a system improves the mechanism it uses to improve itself, potentially creating repeated gains.
rubric
A structured set of criteria used to judge the quality of work.

Reference links

Harness tools and projects

  • codebase-memory-mcp
    Shared as a codebase indexing tool that reduced full file reads and improved cost and output quality.
  • gesetz
    Referenced as an attempt to make code-output quality evaluation reusable.
  • plannotator
    Used for specs and code review, with human feedback later compiled into coding standard skills.

Prompt and context engineering references

Benchmarks and evaluation papers

Side references and jokes