📎 Webclip
The Code-Only Agent
The article argues for a Code-Only agent that can do nothing productive without writing and running code. Instead of tool calls like ls or grep, the agent must generate executable code, so the work becomes a code witness whose output can be rerun and reasoned about.
Reading notes#
- The post starts from frustration with agent ecosystems full of tools, MCP, subagents, and skills, and proposes simplifying the assumptions to a single tool:
execute_code. - In this setup, the agent cannot use
bash,ls, orgrep; it must write code in a chosen runtime such as Python and execute it. - The point is to shift attention from what tools the agent will use to what code it will produce.
- The agent does not answer with a result directly; it produces a code witness, and the answer comes from running that code.
- This makes the work repeatable and more explicit, because the code is governed by the semantics of the runtime language.
- The author treats this as useful for computable tasks where guarantees matter, and connects it to formal verification and the idea that programs are proofs.
- The article describes practical design choices for a Code-Only harness, including how to return outputs, handle large results, and manage
stdoutandstderr. - It also discusses enforcement, saying that a plugin hook can block banned tool uses and push the agent back toward code generation.
- The runtime choice matters, with Python, TypeScript, Rust, and Bash all presented as possible options depending on the domain.
- The post suggests that reusable building blocks for Code-Only agents may emerge as executable patterns, with functions, loops, and APIs composed programmatically.
- The closing outlook combines Code-Only execution with broader agent orchestration and hybrid tooling, where natural language handles coordination and code handles computation.
