Claude Code: Code Mode Reliability Fixes and Smarter Guidance

Claude CodeView original changelog

Claude Code 2.1.332 fixes a series of Code Mode problems: skipped tool calls with large lists, unanswered messages after Esc, slow commands moved to the background, long waits on stopped commands and subagents failing after 10-minute scripts. Claude is also told that script variables are gone on resume and now confirms before discarding worktree changes.

Key Takeaways

  • Large tool inputs (lists over 4,096 items) are no longer silently skipped.
  • A message typed during a command now starts a new turn after Esc instead of going unanswered.
  • Resuming now tells Claude its earlier script variables are gone.
  • Subagents no longer stall after scripts running over 10 minutes.
  • Claude confirms before discarding worktree changes in Code Mode.
  • Long MCP tool descriptions show whole in tool search, reducing wrong calls.

Fixes

  • A tool call whose input has a list of over 4,096 items was silently skipped, and a very large typed array caused a freeze. The array is now refused rather than freezing.
  • A message typed during a command was left unanswered when Esc was pressed before Claude replied. It now starts a new turn, which a second Esc stops.
  • Claude is now told when a slow command moved to the background and left its script with empty output, and of the time limit on background commands in claude -p and the Agent SDK.
  • Code Mode no longer waits minutes on a command that was already stopped.
  • A typed slash command's inline shell commands now run in Code Mode after a background script's output arrives.
  • Code Mode sessions in the Agent SDK and claude -p no longer sometimes lose Claude's last reply on resume after being stopped mid-script.
  • Resuming a paused workflow no longer waits minutes while other background work runs.
  • Subagents no longer fail with "Agent stalled" and lose their command when a script ran more than 10 minutes.

Better guidance

When a session resumes in Code Mode, Claude is now told up front that its earlier script variables are gone. Claude also confirms before discarding worktree changes, reads artifact files before publishing them, and updates an existing artifact rather than creating a second one. Tool search shows long MCP tool descriptions whole where they fit, since a cut description could lead to wrong calls.