← Back to feed

Anthropic launches Claude Code Mods: TypeScript plugins that rewrite the agent

In October 2026 Anthropic opened Mods for Claude Code: TypeScript/JavaScript modules that hook tool calls, prompts, UI and session lifecycle, can rewrite events, and are not sandboxed — so only trusted plugins should be installed (Claude Code 2.1.287+).

Anthropic launches Claude Code Mods: TypeScript plugins that rewrite the agent

In October 2026 Anthropic introduced Claude Code’s Mods system, a way for developers to rewrite the coding assistant’s behaviour from the inside. A mod is a TypeScript or JavaScript module that exports register(on, options) and hooks events such as tool.call, prompt rewriting, UI rendering and session lifecycle.

The minimal layout includes a .claude-plugin/plugin.json and a hooks/hooks.json listing modules, for example ["./mod.mjs"]. Inside the handler, the ($, e, next) pattern lets you inspect the event, mutate it, call $.ui, $.tool or $.session, or delegate with next(e). Official docs on claude.com and claude.dev describe validation via claude plugin validate.

The version requirement is Claude Code 2.1.287 or newer. Most important for security: mods are not sandboxed. A malicious plugin can, in principle, read secrets from the developer environment, intercept Bash tools or alter permissions. Anthropic and the community insist on installing only trusted sources.

Legitimate use cases abound: redact secrets before they hit logs, force retries on flaky tools, require human approval on git push, adapt the UI to a monorepo, or inject company policy into every prompt. Mods turns Claude Code into a VS Code-style extensible platform — but with access to the agent loop.

The launch lands as autonomous coding agents have already starred in unauthorized-access incidents in training and evaluation environments. Giving third parties unsandboxed hooks widens the surface. Enterprises should treat mods as production code: review, version pins, signing and bans on opaque registries.

Compared with MCP (Model Context Protocol) or other tool channels, Mods operates further inward: it does not only add tools, it rewrites the flow itself. That is power; it is also supply-chain risk. A popular compromised plugin could become a mass developer incident.

For Anthropic, Mods strengthens Claude Code against Cursor, Copilot Agents and open-source forks. Extensibility in the language engineers already use (TypeScript) cuts friction. The commercial message is: do not wait for the lab to add your policy; write it yourself.

Docs note that hooks can gate or retry tool calls and change permissions. Security teams should inventory which events are registered on each workstation and whether any mod disables confirmations. “More productive” must not mean “no brakes.”

Neural Pulse recommends CI pipelines that fail if a non-allowlisted mod appears, and internal demos showing how a benign secret-redaction mod stops tokens leaking to providers. Education over fear: the feature is useful if governed.

Overlap with Claude Frontier Academy is cultural: Anthropic pushes engineers to own deployment. Mods is the local version of that thesis — own the coding-agent loop — with the counterpart of zero trust toward unknown plugins.

As of 4 October 2026, the public mods ecosystem is still young. We will measure adoption by verified plugin counts, reported incidents, and whether Anthropic adds mandatory signing or an optional sandbox mode in later builds.

Meanwhile the editorial rule for teams is simple: Mods yes, unknown-plugin bazaar no. Extend Claude Code the way you would extend an npm supply chain — with eyes open.

A healthy pattern is internal mods signed by platform engineering and shipped via internal artifact stores, never anonymous gists. The Terraform governance mirror applies almost one-to-one.

Anthropic could, in future builds, offer a “sandboxed mods” mode with read-only filesystem and network denied by default. Until then, assume a mod is code with the same privileges you have.

Teams already using git hooks or LSPs can treat Mods as the agent’s policy layer: where rules like “never push to main” or “mask .env” live. That is the use we recommend prioritising.