AI Agents · Analysis
Claude Code Now Ships as TypeScript Mods
A mod is a function on an event. Rewrite the prompt, block a tool, draw a pane. /diff is already a mod. They are not sandboxed.
Alex Rivera · Oct 2, 2026 · Updated Oct 7, 2026 · 12 min read
On this page
Hooks could observe Claude Code. They could not take the wheel. Mods can.
Anthropic shipped TypeScript event handlers that run before, after, instead of, or around almost anything the CLI and desktop app do: a tool call, a permission prompt, a paint of the screen. You write one function, or you ask Claude Code to write it, install it, and hot-reload it in the same session. They ship inside plugins. /diff is already a mod. You can turn it off in /plugin or replace it with yours. That is the roadmap said out loud: peel the product down to a core and let the rest be optional.
Image: Anthropic, Customize Claude Code with mods in TypeScript.
The security model is the product
Mods run with the same access as Claude Code. They are not sandboxed. Anthropic says that in the first paragraph, the way a good vendor admits the blast radius before the demo. Install only what you would install as a binary. On Team and Enterprise, and on machines with managed settings, a built-in mod named sec-default loads first and stops later mods from overriding deny rules. Admins can load their own first instead. If they do, Anthropic tells them to keep sec-default in the list. Read that as: we will not save you from a marketplace plugin unless you keep our guardrail on.
What you can actually do
Rewrite a prompt before it hits the model. Block, rewrite, or retry a tool call. Approve or deny a permission. Redact secrets from tool output before Claude reads them. Draw buttons. Other mods can listen when those buttons fire. When several mods hook the same event, they run in load order. First in sees the event first and the result last. That is how you stack a security mod under a UI mod under a team's CI pane.
v2.1.288 and v2.1.289 landed on 2–3 October on the public GitHub releases, sitting on the 2.1.287 floor mods require. This is not a blog-only feature. It is in the bits.
The interesting use is not themes. It is policy. A first-loading mod that logs every call every other mod makes. A confirmation before anything touches production config. A pane that shows pipeline status next to the chat. Those are the examples Anthropic gave enterprises, and they are the ones that will survive a security review.
Sources
Anthropic, Customize Claude Code with mods in TypeScript. https://claude.com/resources/articles/claude-code-mods
Claude Code Docs, Mods overview. https://code.claude.com/docs/en/plugins/mods/overview
anthropics/claude-code releases v2.1.288 and v2.1.289, 2–3 October 2026. https://github.com/anthropics/claude-code/releases