Repository navigation
Description
Summary
On a long-lived Claude Code root thread, BB-injected mcp__bb-bridge__* tools (UltraGoal plan tools, collab tools, even omega_operator_ack_v1) disappeared from Claude's deferred tool catalog after a host-daemon reconnect plus /compact. ToolSearch returned No matching deferred tools found with no error for ~28 hours. The same Claude session id recovered them only after bb.service reconstructed the provider process. A stranger should treat this as: plugin tools can silently vanish from a live Claude session and stay gone until process rebuild.
Versions and environment
- bb 0.43.1 deployed from source at local port tip
f3fae1db1(six timeline-worker commits on top oforigin/mainf3e43c40a81ffa5afebf130e64070879d29f813b). The cited Claude-bridge and host-daemon paths are unchanged by those local commits. - Install: systemd user
bb.service, Linux, Node from the bb-app tree. - Provider:
claude-code, Claude Code2.1.268. - Unusual: long-lived busy root (never idle-reaped for ~29h), UltraGoal 0.28.0, host-daemon reconnect during load, operator
/compact. - Could not re-run a clean trusted-checkout synthetic repro in this filing; production evidence is below. Mark the causal fork unverified.
Steps to reproduce
Observed production sequence (WIB). This is the closest faithful repro; a clean compact-after-MCP-attach fixture is the required next proof, not a claim that this already exists.
- Run a busy Claude Code root with plugin tools attached (
mcp__bb-bridge__ultragoal_*callable). - Confirm tools work (here: last success
mcp__bb-bridge__ultragoal_patchat 2026-09-13 07:15:16). - Host-daemon disconnect/reconnect (here: WS 1006 then 1000 at 07:48:07–07:48:11;
provider-claude-codeworker recycled; server re-listen 07:48:10). - In the same Claude session,
/compact(here: compact_boundary 07:53:37, session continued from a previous conversation that ran out of context). - From the agent, ToolSearch for
ultragoal,select:mcp__bb-bridge__ultragoal_patch, andselect:mcp__bb-bridge__omega_operator_ack_v1. - Keep sending turns for hours without idle-reaping the provider session.
- Reconstruct the provider process (here: owner-authorized
bb.servicerestart 2026-09-14 11:42:55) and ToolSearch again.
Did not reproduce as a configure-time skip: tools worked for ~40 minutes after an earlier 06:34 process start on the same plugin SHA. Did not require a plugin version change.
Expected vs actual
Expected: After compact/reconnect, mcp__bb-bridge__* remain in Claude's deferred catalog (ToolSearchable) without a full provider-process rebuild. A root can tell "bridge attached" from "tool never registered."
Actual (verbatim ToolSearch results from the Claude jsonl):
Before rebuild, every search 2026-09-13 07:54:46 through 2026-09-14 11:31:17:
No matching deferred tools found. Note: these configured MCP servers failed to connect, so their tools are unavailable for this session: paper (ConnectionRefused): "Unable to connect. Is the computer able to access the url?"
The paper note is a different MCP server and was present on both failing and succeeding searches.
After bb.service restart, 2026-09-14 11:44:23:
[{"type": "tool_reference", "tool_name": "mcp__bb-bridge__ultragoal_state"}, {"type": "tool_reference", "tool_name": "mcp__bb-bridge__ultragoal_patch"}, {"type": "tool_reference", "tool_name": "mcp__bb-bridge__ultragoal_release_slice"}, {"type": "tool_reference", "tool_name": "mcp__bb-bridge__resolve_finding"}]
Zero mcp__bb-bridge__* / ultragoal_* tool_use between compact and restart. First success after rebuild: ultragoal_state at 11:44:25. Same Claude session id abd8455f-d01b-4e58-8ad8-968bd3fa50c5.
Evidence
- Thread
thr_ud7k5xhiud, providerclaude-code, environmentenv_2j2yd334px, cwd/home/uje/codes/omegacode-wt/integration. - Claude jsonl:
/home/uje/.claude/projects/-home-uje-codes-omegacode-wt-integration/abd8455f-d01b-4e58-8ad8-968bd3fa50c5.jsonl(sessionabd8455f, 2026-09-11 20:28 → 2026-09-14 13:38 WIB). compact_boundary at L11538; last pre-compact bb-bridge tool_use L11413; first post-restart tool_use L24239. - Restart receipts:
/home/uje/jobs-op/tmp/ug/bb-restart/pre-restart.txt,post-restart.txt(MainPID 3221292 → 1798277, issued 11:42:55+07:00, verified 11:44:04). - Logs:
~/.bb/logs/server-stdio.log(Server listening07:48:10; ultragoal loaded 07:48:34),~/.bb/logs/host-daemon-stdio.log(disconnect 07:48:07,provider-claude-codeworker stopped 07:48:11 / ready 07:49:10). No idle reap of this Claude session between 2026-09-13 06:34 and 2026-09-14 11:42. - Observed (BB amplifier, not yet the exclusive cause): later turns of a live runtime do not re-attach
dynamicTools.resumeThreadRuntimeIfMissingreturns if the thread already exists;runSubmittedTurnomitsdynamicTools. ClaudeattachThreadSessionbuilds the bb-bridge MCP server only whenparams.dynamicTools.length > 0. Permalinks onorigin/mainf3e43c40a81ffa5afebf130e64070879d29f813b:bb/apps/host-daemon/src/command-handlers/thread.ts
Lines 163 to 191 in f3e43c4
async function resumeThreadRuntimeIfMissing( args: ResumeThreadRuntimeIfMissingArgs, ): Promise<void> { const { command, entry, options } = args; const { resumeContext } = command; if (entry.runtime.hasThread(command.threadId)) { return; } if (!resumeContext.providerThreadId) { throw new CommandDispatchError( "unknown_thread_runtime", `No provider thread id available for thread ${command.threadId}`, ); } const bridgeLaunch = await resolveRuntimeBridgeLaunch( command.resumeContext.bridgeLaunch ?? command.bridgeLaunch, options, ); await entry.runtime.resumeThread({ bridgeLaunch, environmentId: command.environmentId, threadId: command.threadId, projectId: resumeContext.projectId, providerThreadId: resumeContext.providerThreadId, providerId: resumeContext.providerId, contributedEnv: resumeContext.contributedEnv, options: command.options, instructions: resumeContext.instructions, dynamicTools: resumeContext.dynamicTools, bb/apps/host-daemon/src/command-handlers/thread.ts
Lines 313 to 327 in f3e43c4
async function runSubmittedTurn( command: TurnSubmitCommand, entry: RuntimeEntry, ): Promise<HostDaemonCommandResult<"turn.submit">> { await entry.runtime.runTurn({ threadId: command.threadId, input: command.input, clientRequestId: command.requestId, options: command.options, contributedEnv: command.resumeContext.contributedEnv, instructions: command.resumeContext.instructions, }); return { appliedAs: "new-turn" }; } bb/plugins/provider-claude-code/src/bridge/bridge.ts
Lines 2045 to 2064 in f3e43c4
function attachThreadSession( id: string | number, params: SessionConstructionParams, providerThreadId: string, resume: boolean, ): void { const threadIdRef = { current: params.threadId }; const env = buildSessionEnv(readConfigEnvOverrides(params.config)); const sessionOptions = buildTrackedSessionOptions(params, env, threadIdRef); if (!resume) { sessionOptions.sessionId = providerThreadId; } sessionOptions.canUseTool = createCanUseTool(threadIdRef); if (params.dynamicTools && params.dynamicTools.length > 0) { const mcpServer = buildBridgeMcpServer( params.dynamicTools, createForwardToolCall(() => threadIdRef.current), ); sessionOptions.mcpServers = { [BB_BRIDGE_MCP_SERVER_NAME]: mcpServer }; sessionOptions.allowedTools = getAllowedToolNames(params.dynamicTools);
- Investigation threads:
thr_mwccbuaewx(UltraGoal maintainer request),thr_ud7k5xhiud(Omega corroboration),thr_wqwcxv7i9f(BB-side diagnosis).
What you ruled out
- Not a duplicate of #2384: that issue is configure false→true on release/resume of a stopped thread. This is tools that were attached, then vanished on a live busy session after compact/reconnect, recovered only by process rebuild. They share the construction-time
dynamicToolssnapshot; they are not the same symptom. Cross-link only. - Not #3185: that is fork-after-compact immediately re-compacting.
- Configure-skip is unproven and retracted. Production log line would be
[plugin:ultragoal] agent configure failed:frominvokeWrapped. Zero hits inserver-stdio.logand recentserver.*.logrotations for this plugin. An earlier plugin-service skip hypothesis was withdrawn by the UltraGoal maintainer after the jsonl evidence. The skipcontinueon configure failure still exists in code () but did not fire here.bb/apps/server/src/services/plugins/plugin-service.ts
Lines 1936 to 1954 in f3e43c4
const outcome = await invokeWrapped(pluginId, "agent configure", () => normalizePluginAgentConfiguration({ knownSkillIds, knownToolIds, pluginId, value: provider({ ...context, pluginMetadata: deepFreezePluginMetadata( metadataByPluginId.get(pluginId) ?? {}, ), }), }), ); if (!outcome.ok) { selectedSkillIdsByPlugin.set(pluginId, new Set()); continue; } const selectedTools = new Set(outcome.value.toolIds); - Not side-chat tool exclusion: thread
parentThreadId/originKindare null; the missing window had noultragoal_*names at all (including collab spawn/list), which is not the worker subset. - Not Claude
tool-proxy-mcppagination: it still returns all supplieddynamicTools. - Not UltraGoal 0.28.0 change: same git SHA
93191277before and after; tools worked after the 06:34 start on that SHA. - The
paperMCP ConnectionRefused footnote is not the miss (present on the successful 11:44 ToolSearch too). - Timeline-worker local commits are unrelated to this Claude MCP path.
Suggested priority and effort (optional)
High for long-lived Claude Code + plugin-tool roots: silent loss, no in-session detection, workaround is process rebuild. Causal fork still open, so do not treat this as implementation-approved.
Required next proof (not done)
Keep these two forks separate until one is closed with a fixture:
- Omitted at attach: after daemon reconnect, BB
thread/resume/attachThreadSessionran with empty or plugin-lessdynamicTools. - Claude index loss: MCP was attached, then
/compactdroppedmcp__bb-bridge__*from the deferred catalog.
Required observability: capture dynamicTools names on the resume/attach around compact, and Claude system/init / ToolSearch catalog before vs after compact_boundary, without requiring a full bb.service restart. A compact-after-MCP-attach Claude fixture that asserts mcp__bb-bridge__* remain ToolSearchable is the reproduction this issue still needs.
No code change is authorized from this filing.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 14, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Bug · High priority · Medium effort; labels:
providers,provider-claude-code,no-repro. Final Type verified as Bug.Reproduction report: NOT REPRODUCED, root-cause confidence low. A controlled bridge/MCP probe passed in two clean checkouts of trusted main: tool listing survived a simulated compact event and unchanged session resume. This did not exercise live Claude ToolSearch or a daemon disconnect.
Root cause remains unresolved: construction-time tool attachment is confirmed, but neither empty attachment input during the incident nor Claude catalog loss is established. No PR: the reported failure lacks a faithful failing regression test.
SawyerHood commentedon Sep 14, 2026
Consolidated into #3626 at the owner’s request. The canonical tracker now preserves this report’s additional evidence and acceptance requirements. Closing as duplicate/covered scope, not as fixed.