Anthropic on October 1 shipped mods in Claude Code v2.1.287 — small TypeScript functions that hook into the coding agent's internal events and change what it does. A mod can rewrite a prompt before it reaches the model, block or retry a tool call, approve or deny a permission request, strip secrets from tool output, or replace parts of the interface with custom panels and buttons. Mods ship as plugins and install with /plugin in both the CLI and the desktop app.
This is a deeper extension point than anything Claude Code has offered before. Plugins (introduced last October) packaged commands, subagents and MCP servers, but could not rewrite the agent's own behavior. Mods can intercept an event before, after, or in place of it — and Anthropic is dogfooding hard: the built-in /diff feature now ships as a mod you can disable or replace, and a new built-in mod called "You should know" has a side agent watching your session to flag things you or Claude might miss. The launch examples show the range: Token Weather puts a live context-window forecast above your prompt, Blast Radius dry-runs dangerous commands like rm -rf, and Replay Theater walks you through a round of edits step by step.
The sharp edge: mods are not sandboxed. Anthropic is blunt that they run with the same access to your machine as Claude Code itself — meaning a mod can read secrets, rewrite prompts and approve tool calls before you see them. Install only from sources you trust, the way you would install any code on your computer. For Team and Enterprise plans, a built-in sec-default mod loads first and blocks risky overrides like bypassing permission denials.
For developers, the pitch is a coding agent that finally bends to the workflow instead of the other way around — and, as Anthropic notes, you can write a mod yourself or just ask Claude Code to write one for you.