From Prompt to Harness: Coderlet from Scratch
2026-08-10 • Artificial Intelligence
Artificial Intelligence
AI summaryⓘ
The authors explain that how a programming agent behaves depends not just on its model but also on the system around it, which they call the harness. They study a simple harness design that manages how a request passes through different stages like context setting, model choice, action, feedback, and state updates. Their design splits the system into three parts: the model, execution environment, and the state, which work together to make the agent effective over time. They demonstrate this idea with a working example available online.
programming agentmodel servicetool environmentpersistent staterequest lifecyclecontext formationruntime feedbackenvironmental actionbootstrappingharness design
Authors
Mengfan Li
Abstract
A model alone does not determine how a programming agent acts. What the model sees, how actions enter the environment, how feedback returns, and how one run affects the next all depend on how the harness is organized. Minimal examples usually show only the basic interaction between a model and tools, while production systems spread these relationships across complex components and dependencies. This paper studies a compact harness design by following a single request through context formation, model decision, environmental action, observation return, and state continuation. Three boundaries---model, execution, and state---connect the model service, tool environment, and persistent state, while the request lifecycle determines the order in which these transitions occur. Together, they show the harness's core role: turning model generations into environmental actions, carrying runtime feedback into later decisions, and allowing state to continue across requests. On top of this runtime structure, a harness can also be gradually refined across runs through continued bootstrapping. The design is realized in the executable artifact https://github.com/lilinxi/Coderlet.