Tool pages / Claude Code
Claude Code 2.1.296: latest version, changed flags and gotchas
Latest: Claude Code 2.1.296, released (release notes).
The latest Claude Code (claude, npm @anthropic-ai/claude-code) is 2.1.296, released 2026-10-09 19:28 UTC on GitHub (npm publish 16:58 UTC). Upgrade with claude update, or npm install -g @anthropic-ai/claude-code@latest (on npm 12 add --allow-scripts=@anthropic-ai/claude-code, or claude fails with Error: claude native binary not installed.). The npm stable channel is on 2.1.287. 2.1.296 cuts Sonnet 5.5 cache read pricing to $0.10 per Mtok (was $0.20), adds allow_large to the Read tool, adds autoCompactWindow for subagents, and adds onFailure: "block" for hooks (2.1.295). Help pages across all 56 subcommands are unchanged from 2.1.294. Sandbox runs verified the CLI help tree, npm 12 installation gotchas, and error behaviors.
How do I install or upgrade to Claude Code 2.1.296?
Native install (macOS, Linux, WSL): built-in updater:
claude update
claude --version # 2.1.296 (Claude Code)Native installer (macOS, Linux, WSL):
curl -fsSL https://claude.ai/install.sh | bashnpm (npm 11 and older):
npm install -g @anthropic-ai/claude-code@latestnpm 12 (blocks the postinstall step that links the native binary unless allowed):
npm install -g --allow-scripts=@anthropic-ai/claude-code @anthropic-ai/claude-code@latestHomebrew (`claude-code` follows the stable channel, `claude-code@latest` the latest):
brew upgrade claude-code@latestWinGet:
winget upgrade Anthropic.ClaudeCodePin a version (for example the current stable, 2.1.287):
curl -fsSL https://claude.ai/install.sh | bash -s 2.1.287
# or: npm install -g @anthropic-ai/claude-code@2.1.287Claude Code key facts
- Latest release: 2.1.296, GitHub release 2026-10-09 19:28 UTC; npm publish 2026-10-09 16:58 UTC. Previous: 2.1.295 (GitHub 2026-10-08 19:48 UTC; npm publish 18:22 UTC).
- npm dist-tags on 2026-10-10:
latest= 2.1.296,next= 2.1.296,stable= 2.1.287 (published 2026-10-01). The stable channel is "typically about one week old, skipping releases with major regressions" (Anthropic setup docs). - The npm package is a thin wrapper:
bin/claude.exeplus one optional dependency per platform (@anthropic-ai/claude-code-linux-x64and seven others) and apostinstall(node install.cjs) that links the native binary. Shippedsdk-tools.d.tsbetween 2.1.294 and 2.1.296 addsFileInput.allow_largeandsnippettoPostToolUseresults. - Since 2.1.296, Sonnet 5.5 cache reads are priced at $0.10 per Mtok (was $0.20). Claude Haiku 5.5 remains the default Haiku model on the Anthropic API (1M context window, $0.10/$0.50 per Mtok).
- Anthropic published 27 Claude Code releases on GitHub in September 2026 (2.1.257 to 2.1.286) and 10 from 2026-10-01 to 2026-10-10 (2.1.287 to 2.1.296). Version numbers skip: there is no 2.1.279.
- 149,968 GitHub stars on anthropics/claude-code on 2026-10-10.
What changed in the last 5 Claude Code releases?
Claude Code 2.1.296 (2026-10-09 19:28 UTC)
- Updated
/cost, the status line,--max-budget-usdand the SDK's cost figures to price Sonnet 5.5 cache reads at $0.10 per million tokens (was $0.20). (source) - Added an
allow_largeoption to the Read tool so Claude can read a text file past usual size limits in one call when context permits. (source) - Added
autoCompactWindowto subagent frontmatter and--agentsdefinitions, allowing subagents to auto-compact earlier than the main session. (source) - Added
CLAUDE_CODE_WORKFLOW_SUBAGENT_MODELto run every workflow agent on one model while other subagents retain theirs. (source) - Fixed Edit and NotebookEdit replacing non-ASCII characters in files that are not valid UTF-8 (Windows-1252, Shift-JIS, GBK); such edits are now refused. (source)
- Fixed
claude plugin marketplace add,marketplace updateandplugin installfailing with internal error for marketplaces named likeconstructor. (source)
Claude Code 2.1.295 (2026-10-08 19:48 UTC)
- Added
onFailure: "block"for command and HTTP hooks: a hook that fails to start, times out, or exits with an unexpected code blocks the action. (source) - Added Program Status Protocol (OSC 7501) support: compatible terminals display whether Claude Code is working, waiting on you, or finished. (source)
- Added advice to
claude plugin validatewhen a plugin README has no install command line, printing the line to paste without failing validation. (source) - Added
CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MSto cap how long unattended retry mode (CLAUDE_CODE_RETRY_WATCHDOG) waits out 429 and 529 throttling. (source) - Fixed
claude -ptext output dropping earlier responses when background work started another turn; each turn response prints as the turn ends. (source)
Claude Code 2.1.294 (2026-10-08 05:03 UTC)
- Fixed
promptandagenthooks written as instructions (such as "Block commands that...") allowing what they should block. (source) - Improved how
prompthooks on Stop and SubagentStop written as instructions (such as "Carry on if the build is broken") are judged, so Claude is less likely to stop early. (source)
Claude Code 2.1.293 (2026-10-07 18:10 UTC)
- Added Claude Haiku 5.5 (
claude-haiku-5-5), now the default Haiku model on the Anthropic API — 1M context, $0.10/$0.50 per Mtok ($0.50/$2.50 for prompts over 100K). (source) - Added
agentTypeto thesubagentStatusLinepayload so scripts tell custom subagent types apart; addedisDeferred: falseto$.tool.registerto list mod tool schemas upfront. (source) - Fixed
claude purgestopping silently (exit 0 or hang) when a file or folder could not be deleted; it now deletes the rest, lists what it could not delete, and exits 1. (source) - Fixed a memory leak where an HTTP MCP connection kept every request it had sent until it closed. (source)
- Fixed Claude treating its own last actions before context compaction as finished after it, and fixed messages lost when
←moved a session to the background. (source)
Claude Code 2.1.292 (2026-10-06 18:59 UTC)
- Added
--marketplace <source>toclaude plugin install: adds the marketplace if needed, then installs the plugin from it. (source) - Added an
effortparameter to the Agent tool (low,medium,high,xhigh,max), so a sub-agent runs at the effort level you ask for. (source) - Local (stdio) MCP connections negotiate protocol version 2026-07-28 by default on every install, including Bedrock, Vertex and Foundry;
MCP_PROTOCOL_NEGOTIATION=legacyopts out. Slow servers are remembered for 7 days and connected the older way. (source) - Fixed one-shot
claude -pruns stopping a background command 5 seconds after the final result; they now wait for it. (source) - Added
CLAUDE_CODE_OVERLOADED_RETRY_BASE_DELAY_MSfor a longer backoff on overloaded (529) requests; MCP tools with names over 128 characters are now left out instead of failing every request. (source)
Which Claude Code commands and flags were added or removed?
Claude Code 2.1.294 → 2.1.296
0 commands added, 0 removed, 0 commands with flags added or removed; 0 help pages changed in any way.
Method: bin/tool-snapshot ran --help for every claude-code subcommand of both versions in a throwaway Linux sandbox (56 and 56 help pages), then bin/tool-diff compared them. Hidden flags do not appear in --help.
- Consecutive releases across 2.1.295 and 2.1.296. No CLI subcommands or command-line flags changed in
--helpacross all 56 help pages. - npm package diff of
sdk-tools.d.tsbetween 2.1.294 and 2.1.296 showsallow_large?: booleanadded toFileInput(the Read tool input) andsnippet?: stringadded toPostToolUsesearch results. - 2.1.296 cuts Sonnet 5.5 cache read pricing to $0.10/Mtok (was $0.20), adds subagent
autoCompactWindowandCLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL. - 2.1.295 added
onFailure: "block"for command and HTTP hooks and terminal Program Status Protocol (OSC 7501) support.
Claude Code 2.1.285 → 2.1.294
2 commands added, 2 removed, 5 commands with flags added or removed; 8 help pages changed in any way.
Method: Source-derived (not run): the committed --help data in the 2.1.285..2.1.294 diff was built from source definitions and the tag comparison because sandboxes were paused; no local --help run occurred.
Commands added:
claude plugin testclaude purge
Commands removed:
claude projectclaude project purge
| Command | Flags added | Flags removed |
|---|---|---|
claude | none | --client-data-url |
claude plugin install | --marketplace | none |
claude plugin marketplace add | --json | none |
claude plugin marketplace remove | --json | none |
claude plugin marketplace update | --json | none |
- 2.1.285 is what the npm
stabledist-tag pointed at before 2026-10-09; 2.1.294 wasnexton npm andlateston GitHub. claude project/claude project purgebecameclaude purgein 2.1.288. In 2.1.293claude purgeexits 1 if a file fails to delete instead of silently exiting 0.--client-data-urldisappeared fromclaude --helpin 2.1.287 but was not removed: 2.1.296 still parses it and refuses to start with a non-Anthropic URL (gotcha below).claude plugin testfirst appears inclaude plugin --helpin 2.1.286.sdk-tools.d.ts2.1.285 → 2.1.294 addsWebFetchInput.offset(2.1.290),AgentInput.effort(2.1.292), and timestamps inReadNotificationsOutput.
What breaks when upgrading Claude Code, and how do I migrate?
| Version | Change | Migration |
|---|---|---|
| 2.1.296 | Edit and NotebookEdit now refuse to edit files with non-UTF-8 encodings (such as Windows-1252, Shift-JIS, GBK). Previously, editing such files replaced non-ASCII characters. | Convert files to UTF-8 before editing with Claude Code, or edit them manually outside Claude Code. |
| 2.1.295 | Hooks configured with onFailure: "block" will strictly block the tool call or prompt if the hook process fails to start, times out, or exits with an unexpected code. | Verify that hooks using onFailure: "block" complete reliably within configured timeouts. If non-blocking behavior is required, omit onFailure or set it to default. |
| 2.1.293 | Claude Haiku 5.5 (claude-haiku-5-5) is now the default Haiku model on the Anthropic API. Extended thinking cannot be turned off on Haiku 5.5 (MAX_THINKING_TOKENS=0 has no effect on this model). | To keep Haiku 4.5 for the Anthropic API's haiku alias, set ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001" (or claude-haiku-4-5). On Google Cloud's Agent Platform, haiku resolves to Haiku 4.5; VERTEX_REGION_CLAUDE_HAIKU_5_5 only overrides the region for Haiku 5.5. |
| 2.1.292 | Local (stdio) MCP servers now receive a server/discover request (MCP 2026-07-28) before initialize. A 2025-spec server that never answers unknown requests delays its first connection by about 3 seconds in our run; one that crashes or misbehaves on an unknown method is exposed to it for the first time. | Reply to unknown requests with JSON-RPC error -32601 (Method not found), or implement server/discover. To restore the old handshake, set MCP_PROTOCOL_NEGOTIATION=legacy. |
| 2.1.288 | claude project purge was renamed claude purge; claude project is gone from --help. | Use claude purge [path] (options --all, --dry-run, -i, -y). The old name still works for now and prints a notice. |
| 2.1.287 | MCP servers on the 2025-11-25 protocol can send URL prompts (for example to sign in). | If a server no longer connects after this update, add "bareElicitationCapability": true to its MCP config entry (release notes). |
| 2.1.285 | The MCP server name widgets is reserved in cloud sessions and on self-hosted runners; a server under that name, or a close spelling such as widgets_, no longer loads there. | Rename the server in your MCP config. |
| 2.1.277 | Removed the deprecated TaskOutput tool; the taskOutputMaxChars setting and TASK_MAX_OUTPUT_LENGTH no longer have any effect. | Claude reads a background task's output file with Read. Remove TaskOutput from --tools, --allowedTools and permission rules. |
| 2.1.233 | Todo and task-tracking tools (TaskCreate/Get/Update/List, TodoWrite) are no longer available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5 and newer models. | Set CLAUDE_CODE_ENABLE_TODO_TOOLS=1 to bring them back. |
| 2.1.217 | Subagents no longer spawn nested subagents by default. | Set CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH to allow deeper nesting. |
What Claude Code errors did we reproduce, and how do I fix them?
npm 12 installs Claude Code but `claude` will not start (Claude Code 2.1.296)
npm i -g --silent npm@12.2.0 && echo -n "npm: " && npm --version && npm i -g @anthropic-ai/claude-code@2.1.296; echo "npm_exit=$?"; claude --version; echo "claude_exit=$?"npm: 12.2.0
added 2 packages in 1s
npm_exit=0
claude_exit=1
npm warn install-scripts 1 package had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts @anthropic-ai/claude-code@2.1.296 (postinstall: node install.cjs)
npm warn install-scripts
npm warn install-scripts Run `npm install -g --allow-scripts=@anthropic-ai/claude-code` to allow these scripts once, or `npm config set allow-scripts=@anthropic-ai/claude-code --location=user` to allow them for all global installs.
Error: claude native binary not installed.
Either postinstall did not run (--ignore-scripts, some pnpm configs)
or the platform-native optional dependency was not downloaded
(--omit=optional).
Run the postinstall manually (adjust path for local vs global install):
node node_modules/@anthropic-ai/claude-code/install.cjs
Or reinstall without --ignore-scripts / --omit=optional.Fix: npm 12.0.0 (2026-07-08) blocks dependency lifecycle scripts unless allowScripts covers them. Install with npm install -g --allow-scripts=@anthropic-ai/claude-code @anthropic-ai/claude-code@latest, or use the native installer. (source)
`--dangerously-skip-permissions` refuses to run as root (Docker, CI containers) (Claude Code 2.1.296)
claude -p --dangerously-skip-permissions "say hi" # as root
claude -p --permission-mode bypassPermissions "say hi" # as rootexit=1
--dangerously-skip-permissions cannot be used with root/sudo privileges for security reasonsFix: Run Claude Code as a non-root user. Do not rely on undocumented environment variables as a workaround for this safety check. (source)
Headless `claude -p` with no credentials (Claude Code 2.1.296)
claude -p "say hi" </dev/null # fresh machine, no login, no ANTHROPIC_API_KEYNot logged in · Please run /login
exit=1Fix: Set ANTHROPIC_API_KEY, or sign in once with claude auth login; claude setup-token creates a long-lived token for a Claude subscription. With --bare, only ANTHROPIC_API_KEY or an apiKeyHelper from --settings is read (claude --help). (source)
`claude purge` on non-existent project directory exits with code 1 (Claude Code 2.1.296)
claude purge --dry-run /root/pexit=1
No Claude Code project state found for /root/p under /root/.claude.Fix: Ensure the path passed to claude purge matches an existing project directory tracked under ~/.claude/projects. Since 2.1.293, failed purges exit with code 1 instead of silently succeeding. (source)
An unknown `--effort` value is ignored with a warning, not rejected (Claude Code 2.1.296)
claude -p --effort ultra "say hi" </dev/nullWarning: Unknown --effort value 'ultra' — ignoring it and using the default effort. Valid values: low, medium, high, xhigh, max.Fix: Use one of low, medium, high, xhigh, max. The run continues at the default effort, so a typo in a CI script does not fail the job. (source)
Claude Code release history by month
2026-10: 2.1.287 to 2.1.296 (10 releases to 2026-10-10)
- 2.1.296: Sonnet 5.5 cache read price cut to $0.10/Mtok ($0.20 earlier), Read tool allow_large flag, autoCompactWindow for subagents, CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL. (source)
- 2.1.295: onFailure: "block" for hooks, terminal OSC 7501 Program Status Protocol, claude plugin validate install line advice. (source)
- 2.1.294: fixed instruction-based prompt and agent hooks allowing blocked commands; refined Stop/SubagentStop hook judging. (source)
- 2.1.293: Haiku 5.5 default ($0.10/$0.50 Mtok), agentType in subagent status line, isDeferred: false for mods, claude purge exits 1 on failure. (source)
- 2.1.292: server/discover probe for stdio MCP servers (protocol 2026-07-28), Agent tool effort, claude plugin install --marketplace. (source)
- 2.1.290: WebFetch offset for pages over 100,000 characters; WebSearch budget refills at 100 calls/hour. (source)
2026-09: 2.1.257 to 2.1.286 (27 releases)
- 2.1.259:
--permission-prompts nonefor unattended headless hosts;--jsononclaude plugin validate. (source) - 2.1.269:
claude plugin evalruns a plugin's eval suite and reports scored results. (source) - 2.1.277: removed the TaskOutput tool; 2.1.280: default model on Pro and Team Standard plans changed from Sonnet to Opus. (source)
- 2.1.285:
claude --desktopandclaude plugin configure. (source)
2026-08: 2.1.221 to 2.1.252 (27 releases)
- 2.1.222: removed ultraplan; 2.1.224: removed the 200-subagents-per-session cap. (source)
- 2.1.233: todo and task tools no longer available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5 and newer (
CLAUDE_CODE_ENABLE_TODO_TOOLS=1restores them). (source) - 2.1.248:
--restricted(orCLAUDE_CODE_RESTRICTED=1) removes the tools that run commands or code. (source)
2026-07: 2.1.198 to 2.1.220 (22 releases)
2026-06: 2.1.160 to 2.1.197 (29 releases)
2026-05: 2.1.126 to 2.1.159 (28 releases)
Sources
- anthropics/claude-code releases (GitHub API) (read 2026-10-10)
- @anthropic-ai/claude-code on the npm registry (dist-tags, publish times) (read 2026-10-10)
- Claude Code 2.1.296 release notes (read 2026-10-10)
- Claude Code 2.1.295 release notes (read 2026-10-10)
- Claude Code 2.1.294 release notes (read 2026-10-10)
- Claude Code 2.1.293 release notes (read 2026-10-10)
- Claude Code 2.1.292 release notes (read 2026-10-10)
- Claude Code 2.1.291 release notes (read 2026-10-10)
- Claude Code 2.1.290 release notes (read 2026-10-10)
- Claude Code changelog (anthropics/claude-code CHANGELOG.md) (read 2026-10-10)
- Anthropic pricing: Claude Sonnet 5.5 cache read rates and Haiku 5.5 rates (read 2026-10-10)
- Claude Code model configuration: pinning Haiku and model aliases (read 2026-10-10)
- Claude Code environment variables: ANTHROPIC_DEFAULT_HAIKU_MODEL and VERTEX_REGION_CLAUDE_HAIKU_5_5 (read 2026-10-10)
- Claude Code advanced setup: install, update, release channels, npm (read 2026-10-10)
- Claude Code settings reference: modelOverrides maps exact model IDs (read 2026-10-10)
- Claude Code error reference: effort levels with thinking disabled (read 2026-10-10)
- Claude Code data directory: purge behavior and retained paths (read 2026-10-10)
- npm CLI 12.0.0 release notes (dependency lifecycle scripts blocked by default) (read 2026-10-10)
- GitHub compare v2.1.294...v2.1.296 (CLI surface and changelog comparison) (read 2026-10-10)
- GitHub compare v2.1.285...v2.1.294 (source-derived surface context) (read 2026-10-10)
- MCP specification 2026-07-28 changelog (stateless protocol, server/discover) (read 2026-10-10)
- anthropics/claude-code repository (stars) (read 2026-10-10)
Last verified: 2026-10-10.