Can code serve as the operational substrate for agent reasoning?
Explores whether code functions not just as LLM output but as the executable medium through which agents reason, act, and verify progress. This reframing treats code as infrastructure rather than deliverable.
Most discussion of LLMs and code treats code as a product: the model writes a function, solves a competition problem, or patches a repository, and the code is the deliverable. The "code as agent harness" framing inverts this. In agentic systems, code is increasingly the operational substrate rather than the output — the medium through which an agent reasons (program-aided reasoning externalizes intermediate computation into executable form), acts (robotic and embodied agents run generated programs as policies), models its environment (codebases, execution traces, and tests represent state and dynamics), and verifies (runtime feedback confirms or refutes progress). What makes code uniquely suited to this role is that it is simultaneously executable, inspectable, and stateful: it can be run, read, and carried forward across steps.
This reframing connects threads that otherwise look separate — tool use, planning, memory, and verification all become facets of a single code-centered execution loop. The counterpoint is that not all agent reasoning reduces to code; natural-language deliberation and learned policies do real work that no program captures, and forcing everything into code can be a leaky abstraction. But where verification matters, code's executability gives agents a ground truth that prose lacks. This matters because it offers a unified lens for agent infrastructure: design the code substrate well and reasoning, action, and verification improve together.
Inquiring lines that read this note 116
This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.
What conditions and architecture enable effective agent ecosystems?- Why do planning and grounding have opposing optimization requirements in agents?
- Does the planning-grounding factoring principle apply to other agent tasks?
- Which layer of agent systems creates the largest capability gains in practice?
- Does ontology investment actually improve agent performance on business tasks?
- What makes proprietary data gardens a competitive advantage for agentic organizations?
- What makes some agent infrastructure useful even without widespread adoption?
- How do the four archetypes of agentic systems differ in where they place agency?
- Does calling a system an agent tell us anything concrete about its actual capabilities?
- How does credit assignment drive agents to write information into environments?
- Can agentic reasoning outperform rigid rule-based systems for skill refinement?
- Can programmatic meta-reasoning rewards operationalize agentic process supervision?
- Can institutional models constrain agent behavior across shifting data contexts?
- What makes users willing to relinquish control to an agent?
- How does opacity in agent reasoning compound principal-agent information asymmetry?
- Why do workflow abstractions fail in embodied agent environments?
- Can open agent workflows be modeled as finite event lifecycles?
- Can deterministic function calls prevent agent failures better than protocol-mediated tool access?
- How do agentic systems recover when specialized models operate outside their scope?
- How should the surrounding agent system be designed to ground actions in reality?
- Why do a-priori procedural specifications fail as environments change and interfaces evolve?
- How should human oversight apply to persistent agent-authored code?
- Does encoding governance into runtime loops scale as deployment environments become more complex?
- Why do production agents depend more on their surrounding pipeline than the model?
- When does forcing agent reasoning into code become a leaky abstraction?
- How can formal agents maintain consistency across interdependent definitions?
- Can API-first interaction replace traditional UI-based agent interfaces?
- How should agents separate planning from perception grounding?
- Can specialized perception components replace end-to-end vision in GUI agents?
- How do standardized artifacts improve coordination between writing agents?
- How do standardized artifacts reduce inter-agent communication failures?
- Can code-based reasoning replace natural language deliberation in agentic systems?
- What makes composable abstractions emerge under performance pressure in agent systems?
- When does collaboration help versus harm in multi-agent reasoning?
- Can procedural instructions and platform checks recover performance lost by multi-agent teams?
- Does this three-agent structure map onto software development workflows the same way?
- Can informal codified behavior compete effectively with formally standardized agent communication?
- Can automated evaluation replace human judgment in agent testing?
- How should harness infrastructure validate code that agents generate themselves?
- How can verifiers check policy compliance in agentic reasoning tasks?
- What other agent behaviors besides citations reveal reasoning quality?
- How do you verify agent code under incomplete feedback signals?
- What causes the gap between agent reasoning and agent action?
- Can explanations grounded in observable behavior recover an agent's internal reasons for acting?
- Why do agents claim completion when their outputs remain incomplete?
- What information does an agent need to believe about what they can see?
- How do users form mental models despite incomplete information about agent reasoning?
- Can verification of agent actions after execution substitute for formal communication protocols?
- What does it mean for users to verify an agent's plans before execution?
- How can users verify an agent's plans and reasoning to build common ground?
- How does coding-agent execution fidelity compare to human expert verification?
- How do language agents implement prompts as executable computational graphs?
- How do external prompt artifacts improve agent behavior compared to inline instructions?
- How can we measure whether an agent reasons correctly rather than just sounds plausible?
- What makes language an effective parameterization for procedural knowledge?
- What makes a service visible to autonomous agent systems?
- How should we measure context efficiency and verification cost in agents?
- Can autonomous agents detect increasingly sophisticated specification gaming as they improve?
- Can agents preserve developer intent better to reduce monitoring burden?
- Can we distinguish between agents that produce content on demand versus those acting independently?
- What role does visible agent reasoning play in user mental models?
- Can agents reliably estimate the stakes or consequences of an action?
- How do agents discover and construct new APIs from existing applications?
- When should agent-created code be promoted into permanent harness infrastructure?
- How do agents decide which created code should persist versus disappear?
- Can one-off agent code be safely promoted to durable infrastructure?
- What makes persistent, shared code artifacts from agents hard to manage at scale?
- How do agents decide which created code deserves long-term persistence?
- How should agents decide which created code is worth persisting?
- Can disposable agent-authored code be distinguished from reusable infrastructure?
- Does codifying domain rules into agent scaffolding work at library scale?
- Do agent improvements discovered on code tasks transfer to non-coding domains as well?
- What persistent code artifacts should agents create and share?
- Why do agent-created code artifacts remain underexplored in harness design?
- Can navigable explanations of agent actions work for domains beyond spreadsheets?
- Can per-role retrieval knowledge bases improve multi-agent code generation reliability?
- What execution-layer design prevents agents from passively reacting to environments?
- How do agent-created code artifacts become part of harness infrastructure?
- How does protocol mediation affect determinism in agentic function calls?
- What distinguishes communicative acts from operational actions in agentic LLMs?
- How do LLM-based agents develop shared abstractions through interaction?
- Why did older robot scientists log auditable provenance while LLM agents inherited only generation capability?
- Do formal agent communication languages define accountability better than natural language?
- Why do production AI agents deliberately stay simple and avoid frameworks?
- What data architecture obstacles prevent agents from understanding business context?
- What mental models do users need to oversee AI agents?
- What role does runtime feedback play in agent verification and progress confirmation?
- Why does forcing agents to trace function paths prevent unsupported claims?
- How do execution traces and tests represent agent environment state?
- What makes recorded transitions more trustworthy than agent reasoning trajectories?
- Can execution traces reveal unsupported claims in AI agent behavior?
- Which code verification tasks still require execution instead of reasoning?
- How can agents verify research artifacts faster than they generate them?
- How does validating code differ from writing code as a learning mechanism?
- How well do AI agents understand system design versus individual code sections?
- Does orchestration layer design matter as much as base model capability in coding?
- How can governance structures catch up to agentic AI deployment timelines?
- How do institutional models and protocols scaffold accountability in agentic AI systems?
- Can traditional agency theory tools govern AI agents at scale?
- Do people treat tool-using actions as genuinely agential or merely played?
Related concepts in this collection 2
This note in its neighbourhood — explore the map, then jump to a related concept in the list below.
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
-
Should LLMs handle abstraction only in optimization?
What if LLMs worked exclusively on translating problems to formal constraints, while deterministic solvers handled the numeric work? Explores whether this division of labor could overcome LLM failures in iterative computation.
both treat emitting executable code as the locus of reliable reasoning rather than as a final answer
-
Can structured reasoning replace code execution for RL rewards?
Can semi-formal templates enable execution-free code verification reliable enough to train RL agents without running code? This matters because execution is expensive and slow in agent training loops.
explores the inspectable side of code as a reasoning medium even without execution
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- Code as Agent Harness
- Agentic Code Reasoning
- Human oversight of agentic systems in practice: Examining the oversight work, challenges, and heuristics of developers using software agents
- RESOURCE2SKILL: Distilling Executable Agent Skills from Human-Created Multimodal Resources
- MUSE-Autoskill: Self-Evolving Agents via Skill Creation, Memory, Management, and Evaluation
- Holistic Agent Leaderboard: The Missing Infrastructure for AI Agent Evaluation
- Emergent Hierarchical Reasoning In LLMs Through Reinforcement Learning
- BenchShield: Formal Model-Backed Instrumentation for Reward Integrity in LLM-Agent Evaluation Infrastructure
Original note title
code is not only llm output but an executable inspectable stateful medium through which agents reason act and verify