Repository navigation
Conversation
A child got a `tools` allowlist of the extension tools registered when it was built. The SDK fixes that list at session creation, so a tool an extension registers at session_start or later (pi's dynamic-tools example) was never callable, even with extensions loaded. A child that loads extensions without `ext:` selectors now gets no allowlist: `noTools: "builtin"`, its built-ins as `+name` entries, and the other built-ins and the reserved subagent tools excluded, so an extension still cannot switch on a built-in the profile leaves out. The snapshot records this so reload and reopen behave the same. `ext:` selectors keep the name allowlist: the SDK admits tools by name only and offers no source-aware hook. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A child got a
toolsallowlist of the extension tools registered when it was built. The SDK (still in 1.1.0) fixes that list at session creation and offers no source-aware admission hook, so a tool an extension registers atsession_startor later (pi'sexamples/extensions/dynamic-tools.ts) was never callable in a subagent, even with extensions loaded: the model was never offered it and a forced call returnedTool echo_session not found. Reproduced on main with the reporter's offline repro adapted to the real spawn path.Fixed for children that load extensions without
ext:selectors (the Agents panel's extensions switch, or anextensions: [...]list):subagentToolOptions()inlib/subagents.ts, shared by spawn (lib/subagent-runtime.ts) and reopen (lib/rpc-manager.ts): no allowlist;noTools: "builtin", the profile's built-ins as+nameentries, and the other built-ins plus the reserved subagent tools excluded. An extension still cannot switch on a built-in the profile leaves out (tested: an extension enablingwritefails).allExtensionTools, so reload, resume and reopen behave the same. Child sessions created before this keep their old allowlist on reopen.SDK_BUILTIN_TOOLSmirrors the SDK's unexported built-in list; a test catches a new built-in.Not fixed: children with
ext:selectors still resolve to tool names at spawn, so a selected extension's late tools stay unavailable. Workaround: scope withextensions: [dynamic-tools]instead oftools: ext:dynamic-tools. Choosing late tools one by one needs an SDK hook.Tests:
lib/subagent-late-tools.integration.test.mjs(realAgentSession, faux provider: spawn, reload, reopen, theextensions:list case, the non-matching selector), a unit test inlib/subagents.test.mjs, updated source patterns inlib/rpc-manager.test.mjs.tsc, eslint,npm testpass.Refs #883
🤖 Generated with Claude Code