AI NewsDev toolsAnnouncement

Anthropic adds mods to Claude Code, small TypeScript functions that can rewrite prompts, block tool calls, or redraw the interface

Anthropic has shipped mods for Claude Code, small TypeScript functions that hook into events the tool emits and can rewrite prompts, block or retry tool calls, redact secrets, approve permission requests, or draw new panes in the terminal and desktop app.

AI News

Editorial3 min read

LinkedInX
Anthropic Claude Code mods announcement card

Image: Anthropic

Why it mattersA team can now change how Claude Code works without waiting for Anthropic to ship a feature, which means production safeguards, CI panels and audit logging can be built into the tool rather than wrapped around it.

Customizing Claude Code used to stop at settings, hooks and MCP servers, which can shape instructions and permissions but cannot touch what Claude Code draws on screen or replace one of its built-in features.

Anthropic introduced mods for Claude Code on 1 October 2026 to close that gap. A mod is a small TypeScript function that hooks into one of the events Claude Code emits each time it does something, such as calling a tool, asking for permission, or drawing part of the screen. A mod can run before the event, after it, or in place of it, and ships inside a plugin that installs through the Claude directory or the /plugin command. The New Stack reports that mods are enabled by default in Claude Code 2.1.287 and later.

What a single function can touch

Anthropic's blog lists five things a mod can do with one function: rewrite a prompt before it reaches the model, block or rewrite a tool call, retry a tool call, approve or deny a permission request, and redact secrets from tool output before Claude reads it. It can also edit or replace parts of the interface Claude Code draws, add buttons and inputs that other mods can respond to, and target the terminal, the desktop app, or both. When several mods hook the same event, Anthropic says they run in load order, so authors can stack mods from different sources.

In a technical blog accompanying the launch, Addy Osmani of Anthropic walks through a roughly 80-line mod called Token Weather that tracks how much of the 200,000-token context window has been consumed. The display reads "Clear" at 18 percent, "Showers" at 67 percent, and "Storm" at 81 percent, and shows how many tokens the latest turn added.

Built-in features are becoming mods

Anthropic has rewritten the built-in /diff pane and AGENTS.md support as mods, and published their source in the Claude Code repository. A user can now turn /diff off through /plugin or replace it with their own version. The announcement says more built-in features will move to mods over time, so Claude Code can pare down to a small core.

Teams get a security-default mod

Mods ship inside plugins and inherit plugin controls. On Team and Enterprise plans, an owner can allow or block plugin marketplaces from the admin console. On Claude API and third-party API plans, admins push managed settings to users' machines.

A built-in mod called sec-default loads first on Team and Enterprise plans and on any machine with managed settings. Anthropic says it stops user-installed mods from doing risky things, such as overriding permission deny rules, and that admins who load their own first mod should include sec-default to keep its restrictions. The source of sec-default is published so a team can read what it blocks.

Mods are not sandboxed. Anthropic warns that they run with the same access to the machine as Claude Code, so a mod from an untrusted source has the same reach as any code a developer runs on their computer.

How it got here

The feature was floated publicly on 3 September 2026 as "function hooks" in GitHub issue 91870, where Anthropic asked developers for feedback on an API that would let JavaScript and TypeScript functions intercept events inside Claude Code. The New Stack reports that it was renamed "Claude Mods" six days later.

Boris Cherny, the creator of Claude Code, said on X on 1 October that "each person works differently, so there's no reason why everyone should have an identical Claude experience." Mods are available today in both the CLI and the desktop app.

Source

SourceAnthropic

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX