CapabilityWire
// event · cli

Claude Code v2.1.295: blocking hooks, OSC 7501 status, gateway model allowlists

cli
vendor: Anthropicpublished: 4d agoconfidence: 0.85id: 214c9f6d-0a41-40d7-92f9-7ed728f9183d

Claude Code 2.1.295 adds blocking hook failure mode (`onFailure: "block"`), Program Status Protocol (OSC 7501) terminal signaling, per-upstream model allowlists on the Claude apps gateway, a `models` wildcard list, `forceLoginMethod: "gateway"`, retry watchdog max wait cap, and native mod notifications. Also fixes remote MCP reconnection backoff, MCP pagination loops, and many agent/subagent handoff bugs.

capability delta

An agent can now block actions when hooks fail via `onFailure: "block"`, use Program Status Protocol (OSC 7501) for terminal state signaling, restrict upstreams to specific models, and cap retry wait times via `CLAUDE_CODE_RETRY_WATCHDOG_MAX_WAIT_MS`.

curator note

Large maintenance release with many small capability additions; headline items are the blocking hook failure mode, OSC 7501 terminal protocol support, upstream model allowlists on the gateway, and improved MCP reconnection backoff.

// install
npm i -g @anthropic-ai/claude-code@2.1.295
npm · @anthropic-ai/claude-code @ 2.1.295
// example
json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [
          {
            "type": "command",
            "command": "./guard.sh",
            "onFailure": "block",
            "timeout": 5000
          }
        ]
      }
    ]
  }
}
// links
claude-codeanthropichooksmcposc-7501gatewaysubagents
source: github_release · https://github.com/anthropics/claude-code/releases/tag/v2.1.295