Follow Discord
Sweep 25 Sep 2026 · 19:33Z Build v2.1.283 504 read Stable v2.1.274 Latest v2.1.283 Next v2.1.283 Feeds RSS JSON llms.txt llms-full.txt Unofficial

Claude Code v2.1.281 ·

Plugin hook modules get a shared state store: $.state.get and $.state.set

Plugin hook modules can read and write shared, versioned values with $.state.get and $.state.set, under static and runtime checks

Group of 3 Use it now Notable New Features
JSON All of v2.1.281
Use it nowTier: how much it should matter to you
5Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
PluginsArea: what it touches
New FeaturesKind: in v2.1.281,
What probably matters to youSection of the release

What

Plugins can ship hook modules, small pieces of code Claude Code runs at set moments, including to draw plugin UI. These modules now have a shared key/value store.

  • $.state.get and $.state.set take a reference { plugin, key, id? }. A write can pass ifVersion so it only succeeds if the value has not changed since it was read.
  • Values must be JSON and stay under the same size limit as store.set.
  • Only the plugin that owns a key may write it, and writes are refused while ui.render is running.
  • Readers set up during rendering are refreshed when a value changes, and each write marks "steady" and "live" timestamps.
  • A handler cannot change the reference, ifVersion or the previous value.
  • state.get and state.set join the host's list of allowed calls, next to store.* and clock.*.
  • A static check (one that reads the code without running it) requires plugin and key to be string literals or file-level constants, reports an object literal there, and lists each module's state reads and writes.
  • At run time the host refuses a call whose plugin and key pair was not found by that scan.
  • Plugin validation reads interface PluginState from the plugin's types contract, reports modules that write another plugin's state and keys missing from the contract, and lists state owned by plugins that are not enabled as not checked.

Why

Plugin UI modules can share state that updates across render hooks. Plugin authors who build state keys at run time will get a refusal and need to write them as fixed strings.

See this entry in the whole of v2.1.281 →

Feedback