Dictionary entry Trending
code mode
also codemode
Definition of code mode
-
: a tool-use pattern in which an AI model writes a program that discovers, combines, and calls available tools inside a controlled runtime instead of requesting each tool operation separately
- The agent used code mode to search the API, call several dependent methods, and filter the results in one execution.
- Moving the loop into code mode kept hundreds of intermediate records out of the model's context window.
Two meanings, one word
In everyday English
A mode is a particular setting or way in which a system operates.
In AI
A tool-use pattern in which an AI model writes a program that discovers, combines, and calls available tools inside a controlled runtime instead of requesting each tool…
Origin & history
Cloudflare introduced the name Code Mode in September 2025 for an MCP approach that converts tools into a TypeScript API and asks a model to write code against it. In 2026, Cloudflare documented it as a general tool-use pattern, and other agent harnesses, including Pi, adopted the name and their own implementations.
Test yourself
Which of these is the meaning of code mode?
Cite this entry
"Code mode." AI Dictionary, Dadgogo, https://dadgogo.com/dictionary/code-mode/. Accessed 7 Oct. 2026.