What
- New
ui.focusandui.scrollhook events let a plugin request or commit keyboard focus onto an element it drew, and move or reveal scroll position within a transcript or pane it owns, with ownership checks so one plugin can't steal focus or scroll from another plugin's UI, and tracking of whether a person or the plugin itself initiated the action. - The plugin-facing
$.uiobject gainsui.scroll(withto/in/blockoptions) andui.focus(withrequestId/key), plus newcloseOnEscape,holdToasts, androwsoptions onui.open. A third new event,ui.blit, was also registered in the event-type system. - A new
$.clockplugin API addsnow(),sleep(ms),after(ms, fn), andevery(ms, fn), each validated to require non-negative millisecond counts and wired through cancellation/abort signals.
Why These additions give plugins finer control over their own UI (focus and scrolling, without interfering with other plugins) and a built-in way to schedule timed or repeating work, instead of needing to work around the host for either.
Documented inclaude-code/plugins/mods/api
The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.
Confirmed since
Anthropic's documentation has since written up clock.every, on Use the mods API.
Work that outlives one event, such as checking on something once a minute, runs on a timer you start from `session.start`. A hook itself runs for one event and has a [time limit](/docs/en/plugins/mods/reference#limits) on its own execution…plugins/mods/api see the edit
Confirmed since
Anthropic's documentation has since written up clock.after, on Use the mods API.
Work that outlives one event, such as checking on something once a minute, runs on a timer you start from `session.start`. A hook itself runs for one event and has a [time limit](/docs/en/plugins/mods/reference#limits) on its own execution…plugins/mods/api see the edit
Confirmed since
Anthropic's documentation has since written up clock.sleep, on Use the mods API.
Work that outlives one event, such as checking on something once a minute, runs on a timer you start from `session.start`. A hook itself runs for one event and has a [time limit](/docs/en/plugins/mods/reference#limits) on its own execution…plugins/mods/api see the edit
Confirmed since
Anthropic's documentation has since written up clock.now, on Use the mods API.
Work that outlives one event, such as checking on something once a minute, runs on a timer you start from `session.start`. A hook itself runs for one event and has a [time limit](/docs/en/plugins/mods/reference#limits) on its own execution…plugins/mods/api see the edit
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agrees
Anthropic's documentation has since written up clock.now, on Use the mods API.