Anthropic has introduced Code Mode in Claude Code v2.1.323 as an experimental, opt-in feature enabling the model to write JavaScript that chains multiple built-in tool calls—Bash, Read, Edit—into a single execution step, reducing round-trips for multi-step workflows. Compatible with Opus 5.5, Sonnet 5.5, Haiku 5.5, and Fable 5.2, it requires an interactive terminal session on the native build (Windows needs Git for Windows) and an Anthropic API or Claude subscription; it is unavailable via Bedrock, Google Cloud, Microsoft Foundry, the Agent SDK, VS Code, Desktop app, or -p flag. Activation requires setting CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 in the shell or ~/.claude/settings.json followed by user confirmation. In Auto permission mode, a classifier reviews the generated code rather than individual tool calls, potentially missing runtime-computed values; other modes prompt per tool call. Background execution supports up to two hours while the user continues chatting, but code awaiting user input halts after ten minutes. Anthropic publishes no official token benchmarks, though one independent test reported 11.1k system-tool context tokens with Code Mode versus 24.6k without. The feature blocks API key helpers, OpenTelemetry, and DISABLE_TELEMETRY, and excludes HIPAA or zero-data-retention configurations. Compared to Cloudflare's TypeScript-based Agents SDK and Anthropic's own Python Programmatic Tool Calling (37% token reduction), Claude Code's JavaScript implementation targets CLI-native tool orchestration without disclosed aggregate savings.
Read original
marktechpost