The system, released on October 1 with Claude Code version 2.1.287, extends the tool’s existing plugin framework. Mods can rewrite prompts before they reach the model, block or modify tool calls, approve or reject permission requests, redact information from tool output and replace or augment parts of Claude Code’s interface. Claude
Anthropic said Mods are packaged inside plugins and work in both the Claude Code command-line interface and desktop application. Developers can write their own Mods or ask Claude Code to generate one, install it and reload it during an active session.
The approach gives developers substantially deeper control than Claude Code’s earlier hooks. Traditional hooks can trigger external actions at defined points, but Mods execute functions against events emitted by Claude Code itself. A Mod can run before or after an event, replace it entirely, or wrap an event with code that executes on both sides.
Events available to Mods include tool calls, permission requests and interface rendering. The mechanism can therefore be used for functions ranging from development safeguards to specialised displays. Anthropic’s examples include showing continuous integration and deployment status beside a conversation, requiring confirmation before commands alter production configuration, and recording tool activity for audit purposes. Claude
The company has also moved some existing Claude Code functionality onto the new architecture. The built-in /diff feature, which displays uncommitted changes beside a session transcript, now operates as a Mod. Users can disable it through the plugin interface or replace it with their own implementation. Anthropic said it plans to shift more built-in capabilities to Mods over time, allowing users to retain a smaller core and add features selectively. Claude
Anthropic’s published examples demonstrate how the same framework can support lightweight interface additions and stronger controls. A sample called Token Weather displays context-window usage above the prompt, while Blast Radius can stop a potentially risky shell command and show what it would affect before the user chooses whether to proceed. Replay Theater records edits made during a turn and allows developers to review them sequentially. claude. dev Blog
The flexibility also introduces a significant security consideration. Anthropic says Mods are not sandboxed and run with the same access to a computer as Claude Code. The company advises users to install Mods only from sources they trust, treating them in the same way as other code executed on their machines. Claude
That warning is particularly relevant because a Mod can interact with prompts, tool calls, files, processes and network resources available through Claude Code. Code capable of changing or intercepting those operations could be useful for enforcing organisational policies, but an untrusted extension could also gain broad access within a developer’s working environment.
For organisations, Anthropic has added controls intended to preserve centrally managed restrictions. Team and Enterprise deployments, as well as machines using managed settings, load a built-in security Mod called sec-default first. It is designed to prevent user-installed Mods from overriding managed permission-denial rules and other protected organisational settings. Administrators can also control which plugin marketplaces users may access and can load their own Mods ahead of user extensions. Claude
Multiple Mods can subscribe to the same event. Anthropic says they execute according to their loading order, with the first loaded Mod seeing an event first and receiving the resulting event last. That arrangement permits extensions from different developers to be stacked while giving administrators a mechanism to place protective controls at the outermost layer.
Mods require Claude Code 2.1.287 or later and are enabled by default in supported versions. The system writes version-specific TypeScript declarations for developers, an important detail because Anthropic cautions that the Mod programming interface can change between releases. claude. dev Blog
Follow Arabian Post
Select Arabian Post as your preferred source on Google and MSN News for trusted business news and Arab politics and updates.