Repository navigation
Description
Context
Part of #4278.
An interactive hosted Claude turn sends the runtime's default built-in tools, minus a short fixed list (disallowedTools, packages/ui-backend-claude/src/sdk-options.ts:455). Fourteen of the built-ins that remain cannot do anything useful in a hosted turn, because the session's process ends with the turn or because the host owns the function:
| Built-in | Why it cannot serve a hosted turn |
|---|---|
EnterPlanMode, ExitPlanMode |
plan approval is a terminal UI; the host owns approvals |
EnterWorktree, ExitWorktree |
runtime-managed git worktrees inside the brain bypass the reference worktree model |
CronCreate, CronDelete, CronList, ScheduleWakeup, RemoteTrigger |
session schedulers end with the per-turn process; the host has its own schedules |
Workflow, SendMessage, ListAgents |
cross-process orchestration; background agents end at turn end |
ReportFindings |
a code-review UI hook |
NotebookEdit |
no notebooks; hosted writes go through host tools |
Their definitions are about 70 kB of tool JSON in every request. In three months of recorded use on one hosted install (2,660 tool calls) these fourteen were called three times: SendMessage twice and RemoteTrigger once.
SendMessage is the one judgment call. It can continue a subagent inside the same turn.
Scope
- Add a fixed list of built-ins that a hosted interactive turn cannot use to
disallowedToolsfor interactive profiles. It is a constant, not derived from posture or sandbox state, so the tool list stays stable within a deployment (backends: the tool list changes with posture and sandbox profile, so a posture switch mid-session misses the whole prompt cache #2048). - Decide
SendMessageexplicitly in the PR: keep it if continuing a subagent within a turn works in a hosted turn and is wanted, drop it otherwise. - Keep the fixed registration of reference tools. The published MCP contract specifies registration in every interactive session and a scoped refusal when no handler is available (
docs/integration-contract/mcp.md:1332-1340). A change to that contract requires a separate ruling. - Record the list in
docs/decisions/claude-code-runtime.md.
Out of scope
- Tool search and deferral: backends: tool search is off behind the inference relay, so every tool definition is sent in every request #4306.
- The autonomous restricted envelope and the voice posture's own narrower roster.
Agent,Bash,Read,Edit,Write,Glob,Grep,Skill,WebSearch,WebFetch,TaskStop,ToolSearch. They stay.
Decision before code
Decide whether to keep SendMessage for an in-turn workflow with a live or resumable subagent, or remove it from new sessions along with individually verified unusable tools. The installed SDK documents named agents as addressable while they run. The hosted hook rewrites background Agent calls to foreground (packages/ui-backend-claude/src/input-rewrite-hooks.ts:69-82), so a useful supported path needs a hosted fixture or a documented example. Both recorded calls are leads. Keep SendMessage if that workflow is wanted and can be reproduced. Removing it saves its definition and removes that interaction.
In an offline SDK 0.3.293 / CLI 2.1.293 turn with the Unix relay, resuming with SendMessage newly in disallowedTools removed it and changed the tool array. EnterPlanMode was absent in this fixture’s original request. This proves roster drift from the option change. Each proposed removal still needs the hosted behaviour check listed below.
Acceptance criteria
- For a new interactive session the tool list sent to the provider excludes every built-in selected for removal, by the keyless provider-history test.
- Existing sessions.
docs/decisions/provider-history.mdrequires the original roster throughout the session. Prove the old roster by capturing SDK assembly inputs and provider requests before and after the upgrade. Apply the new selection to new sessions. - A model that calls a removed built-in gets the runtime's ordinary unknown-tool result, and the turn continues, by a test.
- For each built-in on the list, the PR shows it was tried in a hosted turn and names what it did. A built-in that turns out to work is taken off the list.
- The decision record carries the list and the reason for each entry.
- A test covering this fails on the tree before the change and passes after.
Verification
bun run test packages/ui-backend-claude
bun run typecheck
bun run lintContract impact
- Scope is Claude’s built-in roster. The documented reference-tool contract remains in force.
- This changes a published package's behaviour, so it needs a changeset.
2026-11-20 triage at main 63bb400b3. The pinned runtime confirmed that a deployment-wide disallow list would affect resumed sessions. The SendMessage decision and per-tool hosted evidence are distinct questions.
Activity
schlessera commentedon Nov 20, 2026
Decision (maintainer, 2026-11-20): Remove
SendMessagealong with the other listed built-ins that are verified unusable in a hosted turn. The hosted hook makesAgentcalls foreground, so there is no live subagent to message within a turn. The removal applies to new sessions only. A session keeps the roster it started with through every resume, and that is proven by capturing the SDK assembly inputs and the provider request before and after, as the triage note requires. The reference-tool registration contract stays as it is (docs/integration-contract/mcp.md).needs: decisionis removed.schlessera commentedon Nov 20, 2026
Claimed for implementation. Claim token:
claim-5ba82fdf. Branch:fix/4306-model-request-shape.Worked as part of the #4278 epic integration branch epic/4278-host-overhead (one main landing for the epic). Collisions: none recorded at claim.
schlessera commentedon Nov 23, 2026
Closed by #4444, squash-merged to main as
a3395c4b2. The combined review found every non-native criterion met. Native-measurement criteria for this issue moved to #4420 by maintainer decision, because native proof cannot run on the integration host.