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 59
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.
How should planning and perception grounding be factored in agent design?- Why do planning and grounding have opposing optimization requirements in agents?
- How should agents separate planning from perception grounding?
- Does the planning-grounding factoring principle apply to other agent tasks?
- Why do workflow abstractions fail in embodied agent environments?
- How do execution traces and tests represent agent environment state?
- Can deterministic function calls prevent agent failures better than protocol-mediated tool access?
- Can API-first interaction replace traditional UI-based agent interfaces?
- How do standardized artifacts improve coordination between writing agents?
- How do standardized artifacts reduce inter-agent communication failures?
- How do agents discover and construct new APIs from existing applications?
- How does protocol mediation affect determinism in agentic function calls?
- What distinguishes communicative acts from operational actions in agentic LLMs?
- What governance risks emerge when agents communicate in unreadable text?
- 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?
- What execution-layer design prevents agents from passively reacting to environments?
- Can automated evaluation replace human judgment in agent testing?
- What role does runtime feedback play in agent verification and progress confirmation?
- 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?
- How do language agents implement prompts as executable computational graphs?
- Can algorithmic control flow over prompts simulate traditional programming languages?
- How do execution traces represent state and dynamics in codebase modeling?
- What makes a service visible to autonomous agent systems?
- Can code-based reasoning replace natural language deliberation in agentic systems?
- When does forcing agent reasoning into code become a leaky abstraction?
- Which layer of agent systems creates the largest capability gains in practice?
- Why do production AI agents deliberately stay simple and avoid frameworks?
- Why do production agents depend more on their surrounding pipeline than the model?
- How should harness infrastructure validate code that agents generate themselves?
- When should agent-created code be promoted into permanent harness infrastructure?
- How do agents decide which created code should persist versus disappear?
- How should human oversight apply to persistent agent-authored code?
- Can one-off agent code be safely promoted to durable infrastructure?
- Why does forcing agents to trace function paths prevent unsupported claims?
- What makes persistent, shared code artifacts from agents hard to manage at scale?
- How do agent-created code artifacts become part of harness infrastructure?
- How do agents decide which created code deserves long-term persistence?
- How should we measure context efficiency and verification cost in agents?
- Does encoding governance into runtime loops scale as deployment environments become more complex?
- How do external prompt artifacts improve agent behavior compared to inline instructions?
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
- MUSE-Autoskill: Self-Evolving Agents via Skill Creation, Memory, Management, and Evaluation
- Emergent Hierarchical Reasoning In LLMs Through Reinforcement Learning
- interwhen: A Generalizable Framework for Steering Reasoning Models with Test-time Verification
- Agentic Reasoning for Large Language Models
- Externalization in LLM Agents: A Unified Review of Memory, Skills, Protocols and Harness Engineering
- Agents of Chaos
Original note title
code is not only llm output but an executable inspectable stateful medium through which agents reason act and verify