Anthropic launches Claude Code 'mods': TypeScript agent hooks for the agent loop
Anthropic introduced 'mods' on October 1: small TypeScript functions that hook into Claude Code's internal events and change what the agent does. 'A mod can rewrite a prompt, add new UI, replace a built-in feature, or add entirely new functionality,' the company wrote in its launch post.
The hook surface runs across the agent loop: mods can rewrite a prompt before it reaches the model, block or retry a tool call, approve or deny a permission request, redact secrets from tool output, and edit or replace interface elements. When several mods hook the same event, they run in load order — 'the first mod to load sees the event first and the result last.' Anthropic has ported built-in features like /diff into the mod system, establishing that any first-party capability can now be replaced or disabled by a user-installed mod.
Mods ride inside plugins and install via the /plugin command, in both the CLI and the desktop app. They are not sandboxed: 'Mods run with the same access to your machine as Claude Code itself,' the post warns, so users should only install mods from trusted sources. Team and Enterprise plans load a built-in sec-default mod first, intended to prevent risky actions like overriding permission denials.