Instead of the standard one-tool-call-per-turn loop, code-mode lets the model write a single program that invokes tools as CLI commands, loops locally, and returns only a summary to the context window. Uber Engineering reported in its August 2026 "software factory" post that running five identical SQL queries in code-mode cut token usage by more than 50% for tiny result sets and by more than 90% for bulk workflows, and that it also removes MCP tool schemas from the prompt. It is closely related to CLI tool resolution and tool search as fixes for MCP context bloat.