The year/Independent research

Paper 2605.18747

Code as Agent Harness

Published
May 2026
Research lab
Independent
Citations
12
GitHub
623 stars

01 In brief

Summary

This survey introduces the concept of 'code as agent harness,' reframing code from a mere output of large language models (LLMs) to the operational substrate for agentic AI systems.

It argues that code serves as an executable, inspectable, and stateful medium through which agents reason, act, and model their environments.

The paper organizes the literature into three connected layers: the harness interface (code for reasoning, acting, and environment modeling), harness mechanisms (planning, memory, tool use, and control), and scaling the harness to multi-agent systems.

It reviews representative methods and applications across coding assistants, GUI/OS agents, embodied agents, scientific discovery, and personalization.

The survey also outlines open challenges, including evaluation beyond final task success, verification under incomplete feedback, regression-free harness improvement, consistent shared state, human oversight, and multimodal extensions.

The goal is to provide a unified roadmap toward executable, verifiable, and stateful AI agent systems, positioning code as the central organizing principle for agent infrastructure and coordination.

- The survey proposes a taxonomy with three layers: harness interface, harness mechanisms, and scaling the harness.

- It highlights the role of code in externalizing reasoning, grounding actions, and representing environment state.

- It discusses planning, memory, tool use, and feedback-driven control as key harness mechanisms.

- It explores multi-agent orchestration over shared code artifacts for coordination and verification.

- It identifies open problems in evaluation, verification, safety, and multimodal integration for future research.

02 From the paper

Abstract

Recent large language models (LLMs) have demonstrated strong capabilities in understanding and generating code, from competitive programming to repository-level software engineering. In emerging agentic systems, code is no longer only a target output. It increasingly serves as an operational substrate for agent reasoning, acting, environment modeling, and execution-based verification. We frame this shift through the lens of agent harnesses and introduce code as agent harness: a unified view that centers code as the basis for agent infrastructure. To systematically study this perspective, we organize the survey around three connected layers. First, we study the harness interface, where code connects agents to reasoning, action, and environment modeling. Second, we examine harness mechanisms: planning, memory, and tool use for long-horizon execution, together with feedback-driven control and optimization that make harness reliable and adaptive. Third, we discuss scaling the harness from single-agent systems to multi-agent settings, where shared code artifacts support multi-agent coordination, review, and verification. Across these layers, we summarize representative methods and practical applications of code as agent harness, spanning coding assistants, GUI/OS automation, embodied agents, scientific discovery, personalization and recommendation, DevOps, and enterprise workflows. We further outline open challenges for harness engineering, including evaluation beyond final task success, verification under incomplete feedback, regression-free harness improvement, consistent shared state across multiple agents, human oversight for safety-critical actions, and extensions to multimodal environments. By centering code as the harness of agentic AI, this survey provides a unified roadmap toward executable, verifiable, and stateful AI agent systems.