Claude Code Code Mode Gets Faster, Shows Commands Live and Handles Edits and Dev Servers Better

Claude CodeView original changelog

Claude Code 2.1.328 gives the experimental Code Mode a large polish pass. Scripts run faster in auto and bypass-permissions modes, show the running command and its output live, and handle no-op edits and long-running dev servers more gracefully. A dozen Code Mode bugs are also fixed, including scripts being stopped by long-open prompts.

Key Takeaways

  • A 0.75 second pause after most scripts is gone in auto and bypass-permissions modes, making Code Mode noticeably snappier.
  • Scripts now show the running command and its output live, so developers can follow progress as it happens.
  • Shorter tool descriptions and better prompt caching with MCP servers reduce Code Mode's token cost.
  • No-op edits no longer halt a script, and failed edits report where the text matched or came closest.
  • Dev servers start as background tasks visible in /tasks, so they stop blocking scripts.
  • UserPromptSubmit hooks no longer run on script output, so redaction now needs a PostToolUse hook with updatedToolOutput.

Speed and token savings

Code Mode, the experimental mode in which Claude writes JavaScript to call its tools, receives its biggest refinement so far in 2.1.328. In auto and bypass-permissions modes, Anthropic removed a 0.75 second pause that followed most scripts, which adds up over a long session. Tool descriptions are shorter, which cuts token use, and prompt caching improves for new Code Mode sessions that have MCP servers. Claude is also told when an MCP server is still connecting and when the server list changes.

Visibility while a script runs

Code Mode now shows the command a script is running, and its output, while it runs, rather than leaving the developer to wait for the final result. Failures are more informative too: Claude is told which tool calls were still running when a script failed, and when a failing command's long output was cut off.

Smarter edits and dev servers

An edit that changes nothing no longer stops a script, and when an edit fails Claude is told where the text matched or came closest. Dev servers are handled better: Claude is told to start them as background tasks that appear in /tasks, so a server no longer blocks the rest of a script. On Windows, Claude is also told that scripts' shell commands run in Git Bash and that PowerShell aliases run in place of functions with the same name.

Fixes

  • Scripts are no longer stopped when a permission prompt outside auto or bypass mode, a plan approval or a question stays open for ten minutes.
  • Scripts in auto and bypass modes can call an MCP server that connected while the previous script was running.
  • Background scripts now run in a session chosen from the claude --resume picker.
  • Resumed sessions no longer lose a loaded skill, hook context or an approval note, and Claude is told when a script was cut off.
  • Valid scripts that begin with a { block, or use both top-level await and top-level return, are no longer refused.
  • Read-only subagents are no longer offered write() and edit().
  • Esc followed by a command such as /model no longer makes Claude start a turn on its own.

One behavior change

Code Mode no longer runs UserPromptSubmit hooks, managed ones included, on scripts' output. To redact that output, Anthropic points to a PostToolUse hook with updatedToolOutput.