Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.242 ·

Plugin modules with a $ API that can hook events and redraw the terminal UI

Plugins can install code that intercepts tool calls and repaints parts of the terminal interface.

Nothing to try yet Notable In Development
JSON All of v2.1.242
Nothing to try yetTier: how much it should matter to you
3Useful: my rating, 1 to 5
5Signal: worth watching, 1 to 5
PluginsArea: what it touches
In DevelopmentKind: in v2.1.242,
What probably matters to youSection of the release

A full plugin hook API that can substitute terminal rendering is present; nothing overrides anything unless a loaded module declares a handler.

What

A plugin can load a hook module that receives a $ object exposing event chains and host capabilities, letting it intercept tool calls, prompts and agent turns, and substitute the props Claude Code uses to draw its own interface. Message rendering was rewritten so that named draw sites can be targeted individually, and modules run inside their own sandboxed globals so host objects and host stack frames never reach plugin code. Nothing switches this on or off, and a site is only overridden when a loaded module declares a handler for it, so a stock install behaves and renders exactly as before.

Details
  • Event chains available on $ are tool.call, tool.describe, prompt.submit, prompt.section, agent.spawn, turn.start, turn.step, turn.complete and ui.render, with PreToolUse also carried by the same dispatch layer.
  • Capabilities on $ are model.complete, mcp.call, audio.play and audio.speak, the session.* group, tool.list and tool.register, ui.toast, ui.status, ui.log and ui.notice, fs.readFile, fs.writeFile, fs.listDir, fs.exists and fs.stat, store.get, store.set, store.delete and store.keys, and http.fetch.
  • Each capability enforces its own policy check rather than deferring to one shared permission switch.
  • Every call runs its handler chain and fails if nothing at the bottom of the chain terminates it, reporting no core at the bottom of the chain (the site did not install one and the call supplied none).
  • The draw sites a ui.render handler can target are UserMessage, AssistantMessage, ToolUse, ToolResult, TurnDuration, Spinner, InfoNotice, SessionMode and AskUserQuestion.
  • Modules execute against a replacement set of globals: AbortController and AbortSignal, TextEncoder and TextDecoder limited to UTF-8, URL and URLSearchParams, atob and btoa, a hand-written structuredClone, crypto.subtle.digest, randomUUID and getRandomValues, performance.now, and classic-runtime JSX helpers that emit JSX element < markers.
  • Errors thrown by the host are re-thrown as errors belonging to the plugin's own environment, with stack frames outside the plugin directory trimmed away.
  • The hook runtime ships as a bundled worker whose path now appears in build metadata alongside version, build time and git sha.
  • A module that fails to load is reported as plugin_function_hooks_load with a declaration-failed reason.
Evidence

/$bunfs/root/src/plugins/functionHooks/hooks-worker/hooks-worker.js, no core at the bottom of the chain (the site did not install one and the call supplied none), JSX element <

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.242 →

Feedback