# Claude Code 2.1.296: hooks that fail closed and a terminal status

https://aycode.ai/blog/claude-code-2-1-296/ · 2026-10-10 · News

Three releases in two days: hooks can block when they fail, terminals can show Claude Code's state, and /cost now prices Sonnet 5.5 cache reads right.

Claude Code shipped three versions on 8 and 9 October: 2.1.294, 2.1.295 and 2.1.296. Most entries are fixes and work on the enterprise gateway, but a handful change how it feels to work with it every day. Everything is in the changelog; here is what we would not want to miss.

## Hooks that fail closed (2.1.295)

Command and HTTP hooks now accept onFailure: "block". If such a hook cannot start, times out or exits with an unexpected code, the action it guards is blocked instead of let through. These unexpected failures previously let the guarded action continue.

Two related fixes: 2.1.296 makes managed PreToolUse hooks that refuse a tool call with "continue": false really end the turn, and 2.1.294 makes Stop and SubagentStop prompt hooks written as plain instructions ("Carry on if the build is broken") less likely to let Claude stop early.

## Your terminal knows when Claude Code waits (2.1.295)

Claude Code now speaks the Program Status Protocol (OSC 7501). Terminals that implement it can show whether Claude Code is working, waiting for you or done. Mods, the plugins that change how Claude Code behaves, also got $.ui.notify, which raises a native notification through your own notification settings.

## Sonnet 5.5 cache reads at $0.10 (2.1.296)

/cost, the status line, --max-budget-usd and the cost figures Claude Code hands to other programs now price Sonnet 5.5 cache reads at $0.10 per million tokens instead of $0.20. That matches Anthropic's pricing page, where a cache hit on Sonnet 5.5 costs 5% of the $2 input price. A budget set with --max-budget-usd now goes further in cache-heavy sessions.

## MCP and subagents

- MCP tool descriptions sent up front and MCP server instructions may now be 4,096 characters long instead of 2,048 (2.1.296). Descriptions loaded through tool search are cut at 16,384 characters instead of 2,048 (2.1.295).
- A subagent can compact earlier than the main conversation with autoCompactWindow in its frontmatter (2.1.296) and preloads at most 32 skills from its skills field (2.1.295).
- CLAUDE_CODE_WORKFLOW_SUBAGENT_MODEL runs every workflow agent on one model while other subagents keep theirs (2.1.296).

## Small things

- The Read tool takes allow_large, so Claude can read a big text file in one go when the context has room (2.1.296).
- CLAUDE_CODE_OVERLOADED_RETRY_MAX_DELAY_MS stretches the backoff when the API answers with 529 (overloaded) (2.1.296).
- In VS Code, Claude in Chrome now asks before browser actions in every session, as the terminal does (2.1.296).
- On macOS, a session started in your home folder no longer triggers the "access data from other apps" prompt (2.1.295).
- Grep calls sent with grep's own -l, -c or -r flags now run instead of failing (2.1.295).

## Our take

onFailure: "block" is the change that matters. A guard that fails open is worse than none, because you believe you are protected. Turn it on for every hook that protects something. The same week, Anthropic and OpenAI published reports about agents working around restrictions (Anthropic, OpenAI). The direction is clear: guardrails belong outside the model, and they have to hold when they break.

## In AyCode

AyCode uses the Claude Code installed on your computer. Runtime changes therefore depend on that version and the connection AyCode uses; terminal status and VS Code features are not automatically AyCode features. AyCode takes the reported Claude cost from the runtime, so it can display the corrected Sonnet 5.5 cache calculation when that runtime reports it. More on Claude Code and the other agents in AyCode and in the docs.

Sources:
- Anthropic: Claude Code changelog (https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md)
- Anthropic: Claude Code 2.1.294 release (https://github.com/anthropics/claude-code/releases/tag/v2.1.294)
- Anthropic: Claude Code 2.1.295 release (https://github.com/anthropics/claude-code/releases/tag/v2.1.295)
- Anthropic: Claude Code 2.1.296 release (https://github.com/anthropics/claude-code/releases/tag/v2.1.296)
- Anthropic: Pricing (https://platform.claude.com/docs/en/about-claude/pricing)
