WhoBuilt

Code Mode

Code Mode lets AI agents use tools by generating and running code.

Also known as pure code mode, Programmatic tool calling

Key facts

Built by
Sunil Pai, co-creator (co-author of the Code Mode announcement)
Kenton Varda, co-creator (co-author of the Code Mode announcement)
Launched by
Capabilities
supports looping, holding state, sequencing, and parallelization
models generate code, usually JavaScript, to run against an environment

Timeline 6

Dated events, newest first. Open the sources under any item.

How we verify
Launch1Built3Capability2
20263 events
  1. as of Apr 2026Built
    Cloudflare built Code Mode
    “Cloudflare published [a] blog post last summer. Instead of doing a static search tool ... how can we let the agent write code against our API?” 7:20
    Verified2 sources· Talk, Web· archived
  2. as of Apr 2026Capability
    Supports looping, holding state, sequencing, and parallelization
    “You're able to do looping, hold state, sequencing, and parallelization” 2:43
    Unverified1 source· Talk
  3. as of Apr 2026Capability
    Models generate code, usually JavaScript, to run against an environment
    “we asked the model to generate code, usually JavaScript, that we could run against an environment” 2:03
    Unverified1 source· Talk
20251 event
  1. 2025Launch
    Cloudflare launched Code Mode
    “Solution number three was also introduced at the end of last year by Cloudflare. It's called Code Mode.” 5:40
    Unverified1 source· Talk
Undated2 events
  1. undatedBuilt
    Sunil Pai built Code Mode
    co-creator (co-author of the Code Mode announcement)
    Verified2 sources· Web· archived
  2. undatedBuilt
    Kenton Varda built Code Mode
    co-creator (co-author of the Code Mode announcement)
    Verified1 source· Web· archived

Talks 7

18:43
MCP Doesn't Suck. Your Agent Does.

Jan Čurn argues that many complaints about MCP come from how agents use it, especially loading too many tools and results into context, rather than from the protocol itself. He reviews subagents, progressive tool discovery, and Code Mode as ways to reduce context use, then explains why CLIs give agents these advantages by default. He presents MCPC, Apify’s CLI client for MCP, as a way to combine MCP’s remote access and protocol features with a shell interface agents already know. Early Connector Evals results suggest MCPC and native CLI perform similarly, while raw MCP used more tokens in the tested tasks.

Oct 2, 2026· 19 minDiscussed 5:40
18:51
The Spatial Harness: Bringing Agents to the Canvas

Max Drake explains how tldraw is making canvas-based work easier for AI agents, from interpreting a 2D canvas to setting goals and coordinating with other agents. He demos the tldraw Agent Starter Kit and Fairies, a multiplayer environment where people and agents collaborate, with visible task states helping users follow the agents’ work. He also shows Tech Tree, a dependency graph where each task can run as a coding agent. Finally, he describes the tldraw desktop app as a local scripting environment that agents can use to interact with files and desktop windows.

Sep 10, 2026· 19 minMentioned 15:58
19:08
Teaching Coding Agents to do Spreadsheets

Nuno Campos explains how Witan Labs improved coding agents’ spreadsheet performance from 50% to 92% on an internal financial analysis benchmark. The biggest gain came from replacing many separate tools with a persistent Node.js REPL, which let agents combine spreadsheet operations and build on earlier work. He highlights high fidelity formula and rendering engines as essential feedback loops, and discusses the value of domain knowledge, planning, deterministic evaluation, and inspecting traces for bugs. He closes with lessons that may apply to other agent tasks, including revisiting interfaces as model capabilities change.

Jul 8, 2026· 19 minDiscussed 6:09
24:50
Why Eval++ Is the Next Great Compute Primitive

Sunil Pai and Matt Carey explain how Cloudflare’s Durable Objects provide persistent, addressable compute for building stateful AI agents, with features such as resumable streaming and synchronization across clients. They introduce Dynamic Workers, which run generated code in isolated Workers with explicit capabilities, and describe this as a way to safely use code where teams might otherwise rely on JSON or domain-specific languages. The speakers connect these primitives to Code Mode, MCP servers, generative interfaces, and a possible Cloudflare coding-agent harness. They also discuss the Agents SDK, language support, storage options, and examples of how Cloudflare’s infrastructure shapes agent development.

Jun 8, 2026· 25 minDiscussed 5:56
22:41
MCP = Mega Context Problem

Matt Carey explains how exposing large APIs through conventional MCP tools can overwhelm an agent’s context window and leave gaps in API coverage. He compares product-specific MCP servers, CLIs, and tool search with Cloudflare’s Code Mode approach, where agents write code against a typed API and run it in an isolated, guarded environment. He argues that services need rate limits and other protections as agents make more programmatic calls, while clients will gain features such as saved scripts and scheduled tasks. He predicts MCP will become lightweight middleware built into common frameworks, making large APIs easier to expose to agents.

Apr 25, 2026· 23 minDiscussed 7:20
Show 2 more talks