Claude Code 2.1.294-2.1.295 add fail-closed hooks and Claude apps gateway model routing
Claude Code 2.1.294 fixes instruction-style prompt and agent hooks allowing what they should block. 2.1.295 adds onFailure: "block" for command and HTTP hooks, per-upstream model lists on the Claude apps gateway, and many fixes.
What does this mean for me?
Plan for it
Engineering leadership
Cost, risk, timeline, team impact Worth knowingTeams using instruction-style prompt or agent hooks as guardrails should be on 2.1.294 or later, since earlier versions could let blocked actions through. Gateway operators gain per-upstream model routing.
Engineer
What to change, what breaks, what to test Plan for itUpdate to 2.1.295. Add onFailure: "block" to command and HTTP hooks that must fail closed; on a Bedrock-backed Claude apps gateway, grant bedrock:CountTokens. Set MCP_PROTOCOL_NEGOTIATION=legacy if a claude.ai connector breaks on MCP 2026-07-28.
General consumer
Using the Claude apps, not the API No impactNothing to do — this is a Claude Code release and does not change the Claude apps.
Claude Code 2.1.294 fixes prompt and agent hooks written as instructions (such as “Block commands that…”) allowing what they should block, and improves how instruction-style prompt hooks on Stop and SubagentStop are judged. Anyone relying on such hooks as guards should update.
2.1.295 adds onFailure: "block" for command and HTTP hooks, so a hook that cannot start, times out or exits with an unexpected code blocks the action instead of letting it through. For the Claude apps gateway it adds an optional models list per upstream (only listed models are routed there, including on failover), timeouts.upstream_ttfb_ms on cloud upstreams, upstream_request_id in the inference audit event, and a request-id response header. Background requests behind the gateway now use Haiku 4.5 instead of the session’s model where the gateway serves it, and Bedrock token counts now use AWS’s CountTokens API, which needs the bedrock:CountTokens permission. Other additions: CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS, Program Status Protocol (OSC 7501) support, and forceLoginMethod: "gateway" in user settings.
Behaviour changes: claude.ai connectors negotiate MCP protocol version 2026-07-28 by default on installs that fetch no flags (MCP_PROTOCOL_NEGOTIATION=legacy opts out); subagents preload at most 32 skills from their skills field; MCP tool descriptions loaded through tool search are cut at 16,384 characters instead of 2,048; WebSocket MCP messages over 16 MiB close the connection; and the self-hosted runner stops passing the CCR_AUTO_MODE_* variables into sessions. The rest of the release is bug fixes, among them requests on [1m] models failing where a gateway or cloud provider refuses the context-1m beta, and --tools and --restricted not applying to built-in tools registered after launch.
The changelog carries no release dates. This entry is dated October 8, 2026 because both versions appeared between the previous day’s fetch and this run’s.
Topics: Coding tools
Terms on this page: Legacy model