An AI writes code to solve a task — when does that code stop being disposable and start being the foundation?
How do agent-created code artifacts become part of harness infrastructure?
This explores the path by which code an agent writes for itself during a task gets promoted into the durable scaffolding (the harness) that future runs and other agents rely on.
This explores the path by which code an agent writes for itself during a task gets promoted into the durable scaffolding (the harness) that future runs and other agents rely on. The cleanest way to see it is to split agent code into three layers: capability baked into the model's weights, the harness of infrastructure that connects the model's outputs to real actions, and the artifacts the agent itself writes mid-run How do model capability and harness infrastructure relate to agent code?. The interesting movement happens at the boundary between the last two — when something the agent scratched together to get through one task stops being throwaff and becomes part of the standing infrastructure everyone reuses.
That promotion step is the least-studied part of the whole stack. Agent-authored code that persists and is shared across agents is named explicitly as the underexplored layer, and the open problems cluster exactly where you'd expect: deciding what lives and what dies, keeping shared state consistent when many agents touch it, and the actual promotion decision from scratch work to durable infrastructure What happens to code that agents create and then share?. The reason code is the natural medium for this is that it is simultaneously executable, inspectable, and stateful — an agent can run it, read it back, and carry state forward, which is what lets a one-off script behave like a reusable tool rather than a dead transcript Can code serve as the operational substrate for agent reasoning?.
The most concrete mechanism for closing the loop is to make creation happen *inside* the agent's reasoning loop rather than as an offline authoring step. When skill creation is itself a tool the agent invokes mid-task, the new skill is grounded in the exact context that prompted it, validated against immediate runtime feedback, and — crucially — transfers to other agents with minimal loss Does creating skills during execution prevent mismatch with usage?. A related route is mining experience after the fact: inducing reusable sub-task routines from past trajectories and compounding them hierarchically, which yields large gains precisely because the agent stops re-deriving the same procedures every run Can agents learn reusable sub-task routines from past experience?. Both are versions of the same move — turn what worked once into standing infrastructure.
There's a twist worth knowing: the ability to *write* useful harness updates is roughly flat across model sizes, but the ability to *benefit* from them follows an inverted-U, peaking at mid-tier models. Weak models never invoke the new infrastructure; very strong ones stumble on faithfully following their own scaffolding Do stronger models evolve harnesses better than weaker ones?. So promotion isn't free — an artifact only becomes real infrastructure if the agents downstream actually reach for it. That's also why what gets promoted should be governed rather than ambient: when rules live in the memory layer the agent consults during decisions, they actually get used, whereas external policy appendices get ignored Can governance rules embedded in runtime memory actually protect autonomous agents?.
The broader reframing underneath all of this is that agent reliability has migrated out of the model weights and into the surrounding harness of memory, skills, and protocols Where does agent reliability actually come from?. Once you accept that, the question stops being "how do we build a better harness up front" and becomes "how do we let agents grow their own harness as they work" — and the open frontier is the promotion decision itself: which scratch artifacts earn permanence, how shared state stays coherent, and how a tool authored by one agent becomes infrastructure for the rest.
Sources 8 notes
Long-running agentic systems contain three coupled but distinct elements: model-internal capabilities (trained reasoning), system-provided harness infrastructure (tools and APIs), and agent-initiated code artifacts (runtime-created objects). Each strengthens through different design interventions.
Among three agentic code layers, agent-created artifacts that persist and are shared remain understudied. Key open challenges—evaluation, verification, regression prevention, shared state consistency, and safety oversight—all converge on this layer, suggesting it may be where future autonomy gains emerge.
Research shows code uniquely enables agent reasoning, action, and verification by being simultaneously executable, inspectable, and stateful. This unified code-centered loop improves reasoning and verification together compared to natural-language or prose-based approaches.
MUSE-Autoskill couples skill creation to a built-in tool invoked during the agent's runtime loop, grounding skills in the exact context that needs them. On SkillsBench, in-loop skills reached 87.94% accuracy with minimal transfer loss, validating the approach as an architectural principle.
Agent Workflow Memory induces sub-task routines at finer granularity than full tasks, abstracts example-specific values, and compounds them hierarchically. This produces 24.6% relative gain on Mind2Web and 51.1% on WebArena, with larger gains as train-test gaps widen.
Show all 8 sources
Producing useful harness edits shows no capability advantage across model tiers, but using those edits peaks at mid-tier models and declines at stronger tiers. Weak models fail to activate or follow harness artifacts; strong models lose these capabilities as scaling erodes instruction-following.
A persistent agent recorded 889 governance events across 96 active days, with safeguards encoded directly into the memory layer the agent consulted during operation. Runtime-resident governance proved more effective than external policies because the agent actually accessed it during decision-making.
Applied AI research shows capability shifts from model weights to external structures like memory and skills. However, reusable skills bundle executable code and system reach, creating security costs that traditional lifecycle inspection cannot catch when attacks compose across multiple skills.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- MUSE-Autoskill: Self-Evolving Agents via Skill Creation, Memory, Management, and Evaluation
- Code as Agent Harness
- RESOURCE2SKILL: Distilling Executable Agent Skills from Human-Created Multimodal Resources
- Human oversight of agentic systems in practice: Examining the oversight work, challenges, and heuristics of developers using software agents
- From Model Scaling to System Scaling: Scaling the Harness in Agentic AI
- Holistic Agent Leaderboard: The Missing Infrastructure for AI Agent Evaluation
- Demystifying Agent Skills: Why They Work-Until They Don't
- HarnessDev: Can LLMs Create and Evolve Their Own Agent Harness?