Skip to content
Launchpad Library logo
← All glossary terms

How It Works

Code Mode (Programmatic Tool Calling)

An approach in which an AI agent writes a short program to call tools, chain actions, and filter or combine their results inside a sandbox, rather than returning to the model after each individual tool call. Only selected results need to enter the conversation, which can reduce round trips and context use. Anthropic's Programmatic Tool Calling is a specific implementation of this broader pattern; permissions and safeguards still apply to the underlying tools.

Origin · no single documented coiner

Used in agent-engineering discussions rather than credited here to a single coiner. Phil Schmid's November 1, 2026 article describes Code Mode and uses Programmatic Tool Calling as an alternative name. Anthropic separately documents Programmatic Tool Calling as tools invoked from a code-execution container.

Read the source →