anthropic

Claude Mods ship in weeks, and you can flip them on now

Promtime

anthropic

One hook registered on the wildcard sees every event in Claude Code, including every call other plugins make on the $ object, which turns an audit log into a single function. That demo sits in Anthropic's September 9 community update on GitHub, which also gave the feature a product name, Claude Mods, and a shipping window measured in weeks.

At a glance

  • Anthropic now calls the feature Claude Mods at product level, while function hook stays as the documented implementation primitive underneath; a mod, the post says, is just a plugin that uses those hooks.
  • Hooks are TypeScript functions that nest in registration order like Express or Koa middleware, with every side effect routed through a parameterized $ object whose affordances an admin can strip.
  • Testing is open today with CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude, but the shipping promise is stated as N weeks with N never filled in, and the interface is still changing.

If you missed the first round, the proposal went up on September 3 as an internal idea put to the community, with the author writing that the response would likely decide whether it ships at all. Claude Code already has hooks, which Anthropic's documentation describes as user-defined shell commands run at fixed points in a session for deterministic control. Function hooks are the deeper version, and according to a guide at Reinventing they remain a preview behind an environment variable rather than a shipped feature.

Claude Mods is the product name, function hooks the documented primitive

The September 9 update settles the naming. At product level the functionality is Claude Mods; function hook survives as the engineering term of art and the documented primitive mods are built on. A mod is a plugin that uses function hooks, and nothing there changes. Anthropic says the semantics are now largely set, so it does not expect as many breaking changes as in the first week.

Three practical things came with it. The source listings for the first three built-in mods are public. A cheat sheet enumerates affordances on versions 267 and 268, described in the post as today and tomorrow. And anyone who wants to test can start the preview with CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude. The stated intent is to take further existing Claude Code features and migrate them to mod form.

Nine videos, from a hook that says no to a plugin that hides secrets

Nine videos came with the original September 3 post: four basic, three advanced, two case studies. The basic and advanced clips run 60 seconds each, the case studies about two minutes. Anthropic discloses that the thumbnails are AI, while the demos and code are real and run on actual binaries.

In the basics, a hook is a TypeScript function with full type definitions and LSP support; a hook can say no and restrict behavior; a hook can draw, modifying a component's props or wrapping the render nodes it returns, since Claude Code uses React across the board; and an admin can remove affordances from $ so plugins below cannot invoke that side effect.

The advanced set covers nesting by registration order, interaction hooks, where one hook on ui.press sees the same button pressed in the terminal and in the desktop app, and the wildcard. In the case studies, one short ask gets Claude to write, validate and load a plugin that replaces secrets in tool output before the model reads them, and another hides sensitive values in Claude Code Desktop until you hover.

The first mod registered wraps all the others

Hooks compose the way Express or Koa middleware does. Each one receives the event and a next continuation, and the first registered wraps everything after it, which is why the post tells admins to prepend for control and append for defaults. In the Express model this borrows from, middleware runs in the order it was defined, and the chain ends wherever a function does not call next.

Think of a form passed down a row of clerks. Each can stamp it, change it, hand it on, or refuse to pass it at all, and whoever sits first sees it first.

The $ object is where side effects live: every capability a plugin can invoke arrives as a parameter on it. That is why an admin hook that removes an affordance from $ kills that effect for everything downstream, and why a single hook on the wildcard sees plugins' own $ calls. The design is written up in an attached PDF, Function Hooks: Core Architecture, and summed up by the author in one line:

Algebraically, this is just an effect-parameterized endomorphic continuation model for plugins.

The update commits to shipping "on the scale of weeks in lieu of days or months" and never fills in N, and it says the interface and design are still being iterated on. In our view the naming is the soft spot: the post hopes its own ontology is not too confusing while keeping two words, mods and function hooks, for one thing.

When N weeks becomes a date No date is attached to those weeks, and the post does not say which existing Claude Code features get migrated to mod form first, or how many. The near-term markers are versions 267 and 268, the ones the cheat sheet covers as today and tomorrow. Until a build lands, the feedback loop is the product: the environment variable is public, the three built-in mods are readable, and further breaking changes are expected to be fewer, not none.

Comments

No comments yet. Be the first.

Join the conversation

Sign in with Google to leave a comment. Your name and avatar come from your Google profile, and the comment appears after moderation.

We only use your name and avatar from Google. We never store your email address.