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

Claude Code v2.1.281 ·

Permission requests can carry server_prompt and computer_folder for SDK hosts

can_use_tool permission requests gain untrusted server_prompt and computer_folder fields, forwarded to the SDK canUseTool callback

Group of 5 Use it now Internal Changes
JSON All of v2.1.281
Use it nowTier: how much it should matter to you
3Useful: my rating, 1 to 5
4Signal: worth watching, 1 to 5
SDKArea: what it touches
Internal ChangesKind: in v2.1.281,
What probably matters to youSection of the release

What

When a program drives Claude Code through the SDK, the library for running it from your own code, permission prompts arrive as can_use_tool requests. The program answers them through its canUseTool callback. These requests gain two new optional fields, both marked internal:

  • server_prompt: a marker the session service (the cloud side of a session) puts on permission asks it worded itself. Hosts still show the tool name and input whatever it says.
  • computer_folder: an object with a path and a computer_name, naming a folder on one of the person's computers.

Both fields are documented as untrusted text to escape before display. Claude Code checks their shape, and a malformed computer_folder is removed and logged. Both are passed to canUseTool as serverPrompt and computerFolder, together with requires_user_interaction as requiresUserInteraction. Claude Code itself never sets these fields; only the session service does.

Why

If you build on the SDK, your permission prompts can now show which folder on which computer a request is about. Treat both fields as untrusted text, and escape them before showing them.

Read from
Names in the bundlecanUseTool
Since it was published

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 canUseTool, on Hooks reference. `AskUserQuestion` and `ExitPlanMode` require user interaction. In [non-interactive mode](/docs/en/headless) with the `-p` flag, Claude Code offers them only when the run has a [permission host](/docs/en/headless#turn-off-permission-prompts… hooks see the edit
Added since A small documentation edit on Agent SDK reference - TypeScript touched a line naming canUseTool after this was published. * **With neither**: a bare `-p` run, or `query()` that sets neither `canUseTool` nor `permissionPromptToolName`, denies any tool call that would have prompted unless a [`PermissionRequest` hook](/docs/en/hooks-guide#limitations) allows it,… agent-sdk/typescript see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesA small documentation edit on Agent SDK reference - TypeScript touched a line naming canUseTool after this was published.

See this entry in the whole of v2.1.281 →

Feedback