Rijnard van Tonder's exploration of code-only agents reveals how restricting AI to a single execution tool creates computational witnesses with inherent semantic guarantees, fundamentally shifting how we approach verifiable AI outputs.

The relentless expansion of AI agent toolkits has created a paradox of choice. As developers navigate increasingly complex frameworks with multi-layered architectures—tools, MCP controllers, subagents, and skills—the cognitive overhead threatens to obscure core computational goals. Rijnard van Tonder's radical proposition cuts through this complexity: what if agents were restricted to a single, Turing-complete tool? This code-only paradigm forces agents to express solutions exclusively through executable code, creating what van Tonder terms "code witnesses"—artifacts with inherent semantic guarantees that transform how we approach verifiable computation.
The Computational Witness Principle
Traditional agent architectures follow an imperative pattern: the user requests an action, and the agent responds by executing a sequence of tool calls. This approach creates fragmented execution traces where intermediate steps remain opaque semantic islands. The code-only agent inverts this dynamic through enforced simplicity. When tasked with finding a DNA pattern across thousands of files, it doesn't chain ls and grep commands—it generates a complete Python script implementing the search algorithm. This executable artifact becomes the computational witness: a rerunnable, inspectable proof of the agent's reasoning process.
This shift carries profound implications:
- Semantic Anchoring: Code executes within well-defined runtime environments (Python, TypeScript, etc.), providing deterministic behavior absent from probabilistic tool chaining
- Verification Surface: The generated code serves as a focal point for human or automated analysis, enabling validation beyond output inspection
- Composition Primitive: Code blocks become reusable components for complex operations, naturally supporting loops, parallelism, and error handling

Implementation Realities
Enforcing code-only execution reveals unexpected design challenges. Runtime constraints become critical—how should agents handle large outputs? Van Tonder suggests tiered strategies: direct return for small outputs (<1KB), filesystem persistence with path references for larger results. Similarly, stdout/stderr streams require careful mediation between execution environments and conversational context.
The enforcement mechanism itself proves non-trivial. Current systems like Claude Code require guardrails to prevent tool usage relapse. Van Tonder describes a "PreHook" system that intercepts forbidden tool attempts, creating iterative learning cycles where the agent internalizes the code-only constraint.
Language choice carries architectural consequences. Python allows direct in-process execution, while TypeScript integration enables Cloudflare's innovative Code Mode approach. Each runtime offers different safety-utility tradeoffs—a consideration that grows more complex when contemplating multi-language agents.
Philosophical Foundations
The code-only approach resonates with deeper computational principles:
- Proofs as Programs: Generating executable code parallels the Curry-Howard isomorphism where programs correspond to mathematical proofs
- Guarantee Spectrum: From Python's practical determinism to Lean's formal verification, the paradigm scales with language semantics
- Quine Resonance: The self-referential elegance of code generating code echoes classic computational recursion
This paradigm shift recontextualizes recent agent innovations. Anthropic's MCP framework becomes a special case of code API exposure. Skills transform from natural language procedures to composable code modules. Prose.md's agent orchestration gains precision when coordinating code-only executors.
Future Trajectories
Two paths emerge as inevitable developments:
- Orchestrated Semantics: Combining natural language orchestration (prose.md) with code-only execution creates layered systems where intent and implementation separate cleanly
- Hybrid Agency: Blending skills-based abstraction with code-only rigor could yield context-aware systems that switch modalities based on task requirements
As van Tonder concludes, this evolution blurs the distinction between "prompting an agent" and "programming an agent" until the two concepts merge. The code-only agent isn't just simplified architecture—it's a philosophical stance that computation, when possible, should manifest as executable truth.

Comments
Please log in or register to join the discussion