█

AI/TLDR

Anthropic · 2026-10-08 · major

Claude Code 2.1.295 — hooks can fail closed, terminals show agent status

Claude Code 2.1.295 adds onFailure: "block" so a broken command or HTTP hook stops the action instead of letting it through, and supports the OSC 7501 Program Status Protocol so terminals can show if Claude is working, waiting or done.

Claude Code repository card on GitHub

Claude Code lets a broken safety hook block the action, and tells your terminal what the agent is doing.

Quick facts

Versionv2.1.295
MakerAnthropic
Released2026-10-08
HooksonFailure: "block" for command and HTTP hooks
Terminal statusProgram Status Protocol (OSC 7501)
MCP descriptionsCut at 16,384 chars (was 2,048)

What is it?

Command and HTTP hooks in Claude Code 2.1.295 accept a new onFailure: "block" setting. With it, a hook that can't start, times out or exits with an unexpected code blocks the action instead of letting it through. The release also adds support for the Program Status Protocol (OSC 7501), so terminals that implement it can show whether Claude Code is working, waiting on you, or done.

How does it work?

Mods get $.ui.notify for native notifications and Buttons that can hold text and chips. The Claude apps gateway gains a per-upstream models list, a time-to-first-byte timeout for Bedrock, Vertex and Foundry upstreams, and upstream request IDs in its audit log. MCP tool descriptions loaded through tool search are now cut at 16,384 characters instead of 2,048, and subagents preload at most 32 skills.

Why does it matter?

Teams that use hooks as guardrails no longer get a silent pass when the guard itself crashes, which closes a quiet hole in policy setups. The fix list is long: [1m] models no longer fail behind gateways that refuse the 1M-context beta, remote MCP servers in headless sessions reconnect with backoff after outages, and Esc now stops a backgrounded /loop.

Who is it for?

Claude Code users, hook and mod authors, admins running the Claude apps gateway

Frequently asked questions

What does onFailure: "block" do in Claude Code hooks?
Claude Code 2.1.295 adds onFailure: "block" for command and HTTP hooks. When a hook with this setting can't start, times out, or exits with an unexpected code, Claude Code blocks the action the hook was guarding instead of letting it through. This makes a hook fail closed, which suits hooks used as security or policy checks.
Which terminals show Claude Code's status with OSC 7501?
Claude Code 2.1.295 supports the Program Status Protocol (OSC 7501). Terminals that implement the protocol can show whether Claude Code is working, waiting on you, or done. The release notes do not list which terminals support it; Claude Code only sends the status, and the terminal has to implement the protocol to display it.
What changed in Claude Code between 2.1.290 and 2.1.295?
Claude Code 2.1.293 on October 7, 2026 added Claude Haiku 5.5 as the default Haiku model on the Anthropic API. Claude Code 2.1.294 on October 8 fixed prompt and agent hooks written as instructions, such as "Block commands that...", allowing what they should block. Claude Code 2.1.295 followed the same day with fail-closed hooks and OSC 7501 status.
Does Claude Code 2.1.295 fix 1M-context models behind a gateway?
Claude Code 2.1.295 fixes every request failing on a [1m] model when a gateway, Amazon Bedrock, Vertex or Foundry refuses the context-1m beta. Claude Code now resends the request without that beta, so sessions configured for a [1m] model keep working through those providers instead of erroring on each call.

Try it

npm i -g @anthropic-ai/claude-code@2.1.295

Sources · 2 outlets

Tags

  • claude-code
  • anthropic
  • coding-agent
  • cli
  • hooks
  • osc-7501
  • terminal
  • mcp
  • claude-mods
  • gateway
  • developer-tools
  • release

← All releases · Learn AI