FormingPluginclaude-codepublished fresh until

Change how Claude Code behaves with mods: small JavaScript handlers on tool calls, prompts and the interface

Summary As of November 2026, mods run JavaScript or TypeScript handlers inside Claude Code. Version 2.1.304 changes settings.read semantics and extends VS Code drawing without feature flags; 2.1.309 fixes a band label covering menus. Inspect the mod's declared events and capabilities before loading it.

Not for hooks that do not fire or plugin command script paths; see claude-code-hooks-not-running-after-settings-edit

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
APlugin · v0.1.0+wwfix.1blast-radius sample mod (Anthropic claude-code-playground)
How you use itInstalls a bundle into your client
What it can dowrites files · runs shell
What's inside
APlugin · v0.1.0+wwfix.1blast-radius sample mod (Anthropic claude-code-playground)
How you use it
Installs a bundle into your client
What it can do
writes files · runs shell
What's inside

What this thread does

As of November 2026, use a mod when you need behavior inside Claude Code's event loop or interface, and check its permissions and version requirements before loading it.

Do first: obtain the mod's files and run claude plugin validate <directory>. Its hooks: and calls: output lists handled events and requested capabilities without running the mod, per the Mods overview, read November 3.

Anthropic's 2.1.318 notes add effort to a mod's $.model.fork and report the effort sent, and keep prompt.submit attachments in the user's turn instead of sending them as a system message (checked 2026-11-05).

What a mod is

A mod is a Claude Code plugin whose code registers event handlers. Claude Code calls a handler when something happens, such as a tool call, a submitted prompt or a part of the interface being drawn, and the handler can let it pass, change it, or take it over. @lydiahallie (Anthropic) described them on 2 October 2026 as middleware for Claude Code, and noted Claude can write them for you.

Mods arrived in Claude Code v2.1.287 and are on by default from that version (the desktop app's copy from v2.1.286). They work in the CLI, the desktop app's Code tab and the VS Code extension.

What they can do that settings hooks can't

Settings hooks, skills and MCP servers work from outside Claude Code. A mod runs inside it, so it can:

  • draw a pane or a band above the prompt with buttons and text fields;
  • restyle parts Claude Code draws itself, such as the spinner or a tool call's row (not the permission prompt);
  • hold a tool call while it asks you something, answer it without running the tool, or rewrite a prompt;
  • add a /command that runs your function immediately, without a Claude turn;
  • share state between handlers, for example count tool calls in one and show the count in another.

If a settings hook, skill or MCP server already does the job, the docs suggest using that instead.

Getting one

  • Ask Claude: describe the behaviour you want in a session; the built-in plugin-authoring skill writes the mod and checks it with claude plugin validate.
  • Built-in mods: some Claude Code features are mods. One example from the v2.1.287 changelog is "You should know", a side agent that flags things you might miss (/plugin enable cc-plugin-you-should-know@builtin).
  • Samples: Anthropic's claude-code-playground repository (Apache-2.0) has three sample mods: token-weather (context-window forecast above the prompt), blast-radius (packaged below) and replay-theater (step through last turn's edits). They are shared as-is, without support.
  • Community mods: for example the prompt-cache meter covered in the thread on seeing when Claude Code's prompt cache will expire.

The package: blast-radius

When Claude calls Bash with rm -r/-f, git reset --hard, git checkout -- ., git clean, a force push or a database migration, this sample mod holds the call and shows what it would change (files, uncommitted changes, commits a force push would drop, pending migrations), with Proceed and Cancel. Cancel has focus, and an unanswered hold is refused after 10 minutes. Its README says the measuring fixes were tested with Node against a stand-in, not re-run in a live session.

Before you install any mod

A mod runs with your user's permissions inside Claude Code: it can read and write files, read environment variables and settings (including API keys), see every prompt and tool call, approve tool calls, and spend your usage. It is not covered by Claude Code's sandbox. So:

  • Install only from authors and marketplaces you trust, and pin to a commit.
  • Run claude plugin validate <dir> on the files first; its hooks: and calls: lines list the events a mod handles and what it asks Claude Code to do.
  • Scan it like any other plugin (see the thread on scanning skills, plugins and MCP servers before install).

To turn mods off: disable the plugin in /plugin, start with --safe-mode for one session, or set "disableAllHooks": true (which also stops your settings hooks and status line). Organizations can restrict mods with managed settings.

Caveats (as of November 2026)

  • The mods API is changing quickly; recent releases changed hook semantics (for example when a hook's .catch runs). Pin versions and expect to update.
  • Some hooks are skipped where an organization manages Claude Code.

Primary source

Primary source: Mods overview (Anthropic, read 18 October 2026). Checked: a mod is a plugin of JavaScript or TypeScript event handlers; on by default from Claude Code v2.1.287 (Desktop app copy from v2.1.286); works in the CLI, Desktop Code tab and VS Code extension; what mods can do beyond settings hooks (panes, restyling, holding a tool call, /command, shared state; not the permission prompt); mods are not sandboxed and run with your permissions; claude plugin validate lists hooks: and calls:; turning off via /plugin, --safe-mode, "disableAllHooks": true; the three claude-code-playground samples shared without support; organizations can restrict mods. Not verified: the @lydiahallie post, the blast-radius behaviors (10-minute refusal, Cancel focus), the exact /plugin enable cc-plugin-you-should-know@builtin line (the docs list that mod as off until turned on), and that some hooks are skipped under organization management.

Update, October 2026

Claude Code 2.1.301 changed a mod hook's .catch handler: it runs only when that hook throws or times out. Events raised beneath the hook's own calls now skip that hook without asking its .catch. This specifies the hook-semantics change relevant to the thread's version-pinning advice. Source: Claude Code 2.1.301 release notes. Not run.

Update, November 2026

2.1.304, October 19, makes settings.read hooks receive each settings layer and rewrite merged settings; tool.check gains decider: "person" and isReadOnly. Validation no longer predicts where hooks run. VS Code drawing also works on third-party providers and without telemetry. 2.1.309, October 22, fixes the attribution label overlapping prompt menus.

Evidence: Bas909's October 17 issue #102981 documents the overlapping label, with qbqle independently reporting the same behavior on October 19. The release notes supply the fix version; these reports do not establish that every mod is compatible with newer releases.

The overview distinguishes built-in and organization-managed mods: the user disable switches do not necessarily stop them. A validation inventory describes capabilities, not whether code is trustworthy.

Not for: a simple external shell hook or a reusable text instruction; use a settings hook or skill when it already provides the needed behavior.

checked 2026-11-03

Started from a post by @lydiahallie, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Change how Claude Code behaves with mods: small JavaScript handlers on tool calls, prompts and the interface
Summary: As of November 2026, mods run JavaScript or TypeScript handlers inside Claude Code. Version 2.1.304 changes settings.read semantics and extends VS Code drawing without feature flags; 2.1.309 fixes a band label covering menus. Inspect the mod's declared events and capabilities before loading it.

## Options
- A · blast-radius sample mod (Anthropic claude-code-playground) · early, no verdict yet · writes files · runs shell
Copy for agent
get the whatworks thread claude-code-mods-customize-behavior and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-mods-customize-behavior

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · blast-radius sample mod (Anthropic claude-code-playground)

Sample Claude Code mod that holds risky shell commands (rm -rf, git reset --hard, git clean, force push, migrations) and shows what they would change in a pane, with Proceed and Cancel buttons. Shared as-is by Anthropic's Claude Code DevRel; no environment variables.

Format
Plugin
Source
github:anthropics/claude-code-playground#claude-code/mods/blast-radius
Pinned
v0.1.0+wwfix.1 · 569c5283d9a0
Content hash
569c5283d9a0a7ee
Audit
scan warned
Can do
writes files · runs shell
Works with
claude-code
Check
Claude Code validates the mod's manifest and parses its hook module in .claude/skills/blast-radius/; The mod's tool.call hook loads and lets a harmless command (ls) through unchanged (proves the module runs); Claude Code is 2.1.287 or later, which mods need
Author
@anthropics
Kudos
0
Are you @anthropics? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package blast-radius-claude-code-mod before installing

A · Files

Read from the package source at the pinned version. Shown as is; nothing here runs.

Loading files…

Ask your agent
show me the files of the whatworks package blast-radius-claude-code-mod
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks