{
  "id": 142079,
  "title": "Harness Engineering for Self-Improvement",
  "url": "https://urgent.news/2026/08/04/harness-engineering-for-self-improvement",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-04T06:17:54.000Z",
  "source": {
    "name": "Hacker News Best",
    "slug": "hacker-news-best",
    "url": "https://lilianweng.github.io/posts/2026-07-04-harness/"
  },
  "original_language": "en",
  "account": "Recursive self-improvement (RSI) refers to an AI system that can enhance its own intelligence and develop superior models. I. J. Good (1965) first introduced this concept, defining an \"ultraintelligent machine\" that surpasses humans in all intellectual tasks and designs better machines to further improve itself. Yudkowsky (2008) coined the term \"recursive self-improvement\" for a feedback loop where an AI uses its current intelligence to enhance the cognitive machinery responsible for its intelligence.\n\nIn modern AI, this feedback loop might involve rewriting model weights directly or improving the training pipeline and deployment system, which in turn enables a better successor model with enhanced performance across economically valuable tasks. Research in AI has seen accelerated development in frontier labs like Anthropic and OpenAI. The \"deployment system,\" the layer between the raw model and real-world context, is equally crucial as the model's raw intelligence.\n\nA harness is a key component of AI deployment, serving as the system that surrounds a base model, orchestrates execution, decides how the model thinks and plans, calls tools and acts, perceives and manages context, stores artifacts, and evaluates results. This post will focus on research around harness engineering and its role in RSI. Recent work on auto-research, self-improving agents, and evolutionary program search can be organized around harness engineering. Meanwhile, model self-play, synthetic data, test-time training, and continual learning also align with the RSI vision but are not the main focus of this post.\n\nHarness design patterns extend early agent frameworks, which follow the structure \"agent = LLM + memory + tools + planning + action.\" Harness engineering adds workflow design (e.g., loop engineering), evaluation, permission controls, and persistent state management. Instead of just prompt templates, harnesses involve runtime and software system design, including how the model observes, acts, memorizes, checks itself, and improves. The design should be simple and generic, leveraging software engineering practices and existing standards.\n\nDesign pattern 1: Workflow automation involves defining a loop for the model to operate, test, and iterate, aiming for goal-oriented progress. Karpathy's autoresearch repo demonstrates a clean example of this workflow. A simplified Codex agent loop shows the agent calling tools, whose responses affect the model's next generation. The workflow graph emphasizes the model's self-analysis of its trajectories and failure cases, followed by iteration through an \"agent runtime\" rather than a static prompt template.\n\nDesign pattern 2: File system persistence is a common practice in long-horizon agent systems, where durable state and artifacts are kept separate from the context window. Managing persistent memory via file manipulation, such as bash commands, enables LLMs to handle long-form states and artifacts. Design pattern 3: Parallel subagents and backend jobs allow the main agent to execute multiple hypotheses, run experiments concurrently, or delegate isolated tasks without cluttering the main context. The parent agent manages these subagents through process monitoring, log inspection, and result merging. This explicit parallelism ensures outputs are stored persistently for future reference and reasoning. A case study on coding agent harnesses illustrates how mainstream coding agents, such as Claude Code, Codex, OpenCode, and Cursor-style agents, utilize a loop with tools for development, debugging, and repository management.",
  "summary": "Article URL: https://lilianweng.github.io/posts/2026-07-04-harness/ Comments URL: https://news.ycombinator.com/item?id=49164896 Points: 249 # Comments: 55",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}