Anthropic 为 Claude Code 推出 Code Mode 实验特性
Anthropic 在 Claude Code 中上线实验性 Code Mode,允许 Claude 编写一段 JavaScript 程序,把多次工具调用串联成单步执行,并行运行命令并只回传所需结果。该模式默认关闭,需通过环境变量开启,后台代码最长可运行 2 小时,但 Claude 等待的代码 10 分钟后即停止。
报道正文
▲ Marktechpost AI · 2026-11-18 06
▲ Anthropic just shipped Code Mode in Claude Code, so Claude can now write JavaScript that chains its own tool calls in 1 step.
The key idea is simple. Without Code Mode, Claude asks for each Bash, Read or Edit call and reads every result. With Code Mode, Claude writes 1 program that runs commands in parallel, feeds one result into the next call, and returns only the output it needs.
The numbers: code that runs in the background can keep going for up to 2 hours while you keep talking to Claude. Anthropic's related code execution with MCP pattern cut 1 workflow from 150,000 to 2,000 tokens. It is a trade-off though: Anthropic publishes no token figure for Code Mode itself, code Claude waits on stops after 10 minutes, and auto mode reviews the code, not each tool call.
It is experimental and off by default. Opt in with CLAUDE_CODE_EXPERIMENTAL_CODE_MODE=1 on Claude Code v2.1.323 or later. It works with Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2, in the terminal, on the Anthropic API only......
Full analysis:
