DEV Community

MadeByBrain
MadeByBrain

Posted on Originally published at madebybrain.hashnode.dev

Claude Code 2.1.335: Interrupt hook, MCP tokens, org MCP policy

Claude Code v2.1.335 shipped on 3 December 2026. The changelog is long and mostly UI fixes, but a handful of entries matter if you run agents with hooks and MCP servers in a real environment: a new Interrupt hook event, a fix for MCP servers with very short-lived OAuth tokens, and a tighter rule for local MCP servers under organization policy.

I read the release notes and the matching docs pages. I did not run 2.1.335 itself, so treat the behavior descriptions as the vendor's, not mine.

What changed

An Interrupt hook event. The release notes say it fires when a turn is interrupted and tells you whether a person, another session or the system stopped it. The same release adds source and via fields to the session.stop mod event, saying who sent the Stop and how it arrived. At the time of writing, the public hooks reference does not list an Interrupt event yet, so the exact payload is only described in one sentence of the changelog.

Short-lived MCP OAuth tokens. The notes say MCP servers with five-minute OAuth access tokens used to get a token refresh before every request. Short-lived tokens are now used for half their lifetime. If your MCP gateway issues tokens with a very short expiry, this removes a refresh round trip per tool call.

Local MCP servers under organization policy. For organizations managed in Anthropic's Enterprise Admin Console, Claude Code now stops local MCP servers when "Allow local MCP servers" is off, unless an admin's allowlist names them.

claude mcp add --web. This adds a remote MCP server to your claude.ai account as a connector instead of to your local Claude Code configuration. The release notes say it works on paid plans. The MCP docs page section "Add a connector from your terminal" lists a claude.ai login and v2.1.330 or later as requirements (v2.1.332 on Team and Enterprise) and gives this example:

claude mcp add --web notion https://mcp.notion.com/mcp
Enter fullscreen mode Exit fullscreen mode

Cloud sessions and plugin hooks. Cloud sessions can now load the plugins and mods in a repository's .claude/skills. The notes warn that a hook which reaches out of its plugin folder with ../ fails there and can block shell commands.

Harness audit. /claude-api harness-audit looks for agent harness code written for older models (loop limits, sub-agents, context management, injected reminders, session-start code) and proposes fixes as a diff. /claude-api prompt-audit also got better at flagging broad ask-first rules and always-delegate instructions.

Why it matters in production

The token change is the quiet one. Short token lifetimes are a sensible security choice for MCP servers that sit in front of internal systems. Refreshing before every request turns that choice into extra latency and extra load on your identity provider. Refreshing at half the lifetime keeps the short expiry and drops most of the churn.

The local MCP policy change matters for teams with a compliance story. If you tell an auditor that only approved MCP servers can run on developer machines, "off unless allowlisted" is a stricter statement than before. The flip side is that a stdio server someone relies on may stop working if it is not on the allowlist. Check this before you roll the update out to a team.

The Interrupt event closes a gap for anyone who logs agent runs. An interrupted turn may have looked the same in your logs as a turn that simply ended. Knowing whether a human pressed Esc or another session or the system cut it off is useful for audit trails and for deciding whether a half-finished tool call needs cleanup.

The ../ warning is a real portability trap. Hooks that read a shared script from outside the plugin directory work on a laptop and break in a cloud session, and the failure mode is a blocked shell command, not a clean error.

What to do now

Check which version you run and whether you use any of the affected features:

claude --version
claude mcp list
Enter fullscreen mode Exit fullscreen mode

Search your plugin hooks for paths that leave the plugin folder:

grep -rn '\.\./' ~/.claude/plugins/*/hooks* 2>/dev/null
Enter fullscreen mode Exit fullscreen mode

That grep is a rough heuristic of mine, not a documented check. Adjust the path to wherever your plugins live.

If you manage MCP servers for an organization, list the local servers developers actually use and put them on the admin allowlist before the policy applies. If you operate your own MCP gateway with short-lived tokens, watch your token endpoint request rate before and after the update to see whether the refresh change shows up.

Caveats

  • The Interrupt event and harness-audit are described in the release notes only. The hooks reference does not list the Interrupt event, and I found no docs page for harness-audit, so field names and behavior may differ from what I describe.
  • I did not test any of this on 2.1.335. The only thing I checked locally is that the older 2.1.220 build has no --web option.
  • The "half their lifetime" wording comes from the changelog. I could not verify the exact refresh timing.
  • Some of the changes depend on your plan or on Anthropic's admin tooling and do not apply to self-managed setups.

Sources


Field Notes is a short series by MadeByBrain about what changes in the AI agent tooling we run in production every day. Researched and drafted with AI assistance (Hermes Agent), fact-checked against the linked sources and reviewed by Steffen Hartmann.

Top comments (0)