Repository navigation
Description
Problem
After a plugin's tool contract changes and the plugin is reloaded, an existing Claude thread keeps exposing the old tool definition (description and input schema), even after bb thread stop and a new turn. A fresh exact-name ToolSearch on the resumed thread also returns the old definition. The new fields can't be used from that thread.
Environment
BB 0.46.0, macOS, built-in provider-claude-code with its bb-bridge MCP server. Local-path plugin registering tools via bb.agents.registerTool.
Observed
- Thread discovers plugin tool T (description "v10", schema S10).
- Plugin updated so T is "v11" with schema S11: new optional
selectionobject on one operation, new requiredassessmentobject on another. Built, thenbb plugin reload→ ok/running. bb plugin list --jsonshows T as v11.bb thread stop <thread> --json→ ok; thread showsidle.bb thread tell <thread> '...' --mode autoresumes it. Other MCP servers reconnect.- On the resumed thread, T is still v10 / S10, including after a fresh exact-name ToolSearch.
Expected
After plugin reload plus a supported runtime release, the resumed thread's tool definitions match the current plugin registration. Or, if resume intentionally keeps discovered schemas, BB detects the mismatch and offers a supported refresh.
Likely cause
BB passes current registry definitions as dynamicTools to the Claude adapter, which builds bb-bridge tools/list from them. bb thread stop releases the runtime but keeps the provider session identity, so the next turn resumes the old Claude session, and its discovered/deferred tool schemas appear to persist. bb thread clear starts a new provider session and is the only workaround we found, at the cost of model context.
Observed: bb thread clear fixed it — yes. After clearing the same thread, an exact-name ToolSearch returned the v11 description and schema.
Repro
- Plugin tool
schema_probe, description "A", schema{revision: "A"}; start a Claude thread and discover it. - Change to description "B", schema
{revision: "B", marker: string}; build and reload the plugin. - Stop the thread, then resume with a normal message.
- ToolSearch
schema_probeon the resumed thread: returns A (bug). Expected B, which a new thread should return.
Requested
A supported way to refresh tool definitions on an existing thread without clearing its context: automatic refresh when dynamicTools change, or a targeted command. Plus a regression test covering plugin reload → stop/resume → rediscovery.
Activity
bb-slop-cop commentedon Oct 20, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotproviders,provider-claude-code,plugins.confirmed-repro.bd93d18896ba.lanjak commentedon Nov 13, 2026
Had a look at this on main at 88cf8f644c. The stale schema isn't coming from bb.
What bb does: on
thread/resumeit rebuildsbb-bridgefrom the currentdynamicTools(plugins/provider-claude-code/src/bridge/bridge.ts:2420), andtools/listreturns the new definitions.What the CLI does: the session file keeps a
deferred_tools_recordattachment with the generation-1 schema, and the resumed conversation uses that instead of the live MCP definition. The report's repro still fails on Claude Code 2.1.318 and 2.1.323 ('Contract generation 1'vs'Contract generation 2').Tried, no effect:
systemPrompt.snapshot: false: removesprompt_snapshot, butdeferred_tools_recordis still written.alwaysLoad: trueon the bridge server: the tool is still sent withdefer_loading: true.I couldn't find an SDK option to refresh recorded tools on resume. That the CLI pins them on purpose is my reading of its compiled code, not documentation.
So a refresh on the bb side (#5843, #3626, the closed #6479) probably won't fix this case on its own. The options I can see:
The last one seems cleanest.
bb thread clearshould work around it until then, though I haven't tested that.