Use it now
Hooks/plugin runtime gains a 'to' messaging function, a 'surface' concept, and table-resolution requests
What
Claude Code's hooks and plugin runtime API has been expanded in several related ways:
- Hook manifests can now declare a
surface, carried alongside each module's specification - The internal hook-call wrapper gains a
tofunction and acaughthandler, in addition to its existing call/signal/event/origin/trace parts - A new
resolveTables/resolvemessage type lets a hooks worker request table resolution and get back aresolvedorresolve_errorresponse - Internal environment-state tracking gained new
framingandresolvingmaps - Error text shown to plugin authors now references
next.to always next.to(e, "<tier>")
Why
This extends what a hook or plugin can do at runtime, including sending messages via to and resolving tables, though the finding does not describe the specific new capabilities these enable for plugin authors.
Names in the bundletosurface
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.
Added since
A small documentation edit on TypeScript SDK V2 session API (removed) touched a line naming surface after this was published.
V2 was an experimental session API that removed the need for async generators and yield coordination. Instead of managing generator state across turns, each turn was a separate `send()`/`stream()` cycle. The API surface reduced to creating…agent-sdk/typescript-v2-preview see the edit
Confirmed since
Anthropic's documentation has since written up surface, on Error reference.
| [`CLAUDE_CODE_MAX_RETRIES`](/docs/en/env-vars) | 10 | Number of retry attempts. Capped at 15 as of v2.1.186; as of v2.1.199 `CLAUDE_CODE_RETRY_WATCHDOG` raises the default and removes the cap. Lower it to surface failures faster in scrip…errors see the edit
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubt
What concrete new plugin/hook capabilities this enables, and what a 'surface' or 'table' represents here, isn't explained.
Anthropic's documentation agrees
Anthropic's documentation has since written up surface, on Error reference.