Claude Code v2.1.295: blocking hooks, OSC 7501 status, gateway model allowlists
cliClaude 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.
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`.
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.
npm i -g @anthropic-ai/claude-code@2.1.295{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "./guard.sh",
"onFailure": "block",
"timeout": 5000
}
]
}
]
}
}