Claude Code previews Function Hooks for deeper plugin control
- Source
- x.com
- Publisher
- Anthropic
- Date
We're exploring a new way to let you extend and customize Claude Code: Function Hooks. Here's a couple videos showing what you'd be able to do. It hasn't shipped yet, we'd love feedback on this on our GitHub issue.
Context
Hooks are small plugins that run inside an Anthropic Claude Code and change what it does, and the two demo videos show them working on both sides of the conversation: what the model receives and what the person sees. The ClaudeDevs account previewed them on X on September 3, said the feature had not shipped, and asked for feedback on a GitHub issue.
In the first video, one typed sentence asks Claude Code to redact high-entropy secrets from tool output and tell the model how many it removed. Claude Code writes a that runs on each : it waits for the result, scans it for long runs of key-like characters, scores each run by entropy (how random the string looks, which separates generated keys from ordinary words), swaps the high scorers for a marker, and adds a note with the count so the model knows the output was changed. With the plugin loaded, a file read came back with two keys replaced by markers and the plain line untouched. The second video works on the interface instead. A hook on the desktop app's render step hides numbers and email addresses on screen until the person hovers over one, while Claude still reads the real values and answers a question that depends on them. The narrator says the plugin loaded into the running session without a restart.
The GitHub issue lays out the design: hooks are TypeScript functions in the style of Express or Koa middleware, plugins nest so the first one registered wraps the rest, and side effects go through a single object named $ so administrators can audit, allow or deny them. A September 9 update there named the product Claude Mods, with function hooks as the building block, and an October 1 update said it was live. This post therefore records the proposal stage. Dan McAteer's Latent Space piece describes weeks of using the shipped Mods.
- Function — A named block of instructions that takes inputs, called arguments, and hands back a result, called its return value.
- Session — One conversation or piece of work as a harness keeps it: a record of messages, tool calls and observations that can be saved and resumed.
- agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.
- Tool call — Text the model generates in an agreed format that names a tool and gives its inputs.








