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
uje-m commentedon Sep 14, 2026
Ownership: BB-side record for the Omega compact/reconnect tool-loss incident. I could not set GitHub assignee (
replaceActorsForAssignabledenied foruje-m).Native blocker: #3628 (capability-probe proposal) should wait on this issue's causal fork + compact/reconnect fixture.
addBlockedBywas also denied; the blocked-by edge is in #3628's body.Related, not a duplicate: #2384 (configure false→true on release/resume). Same construction-time
dynamicToolssnapshot, different trigger.No code change is authorized from this filing.
bb-slop-cop commentedon Sep 14, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotBug · High priority · Medium effort — applied
providersandprovider-claude-code; no existing classifications were replaced.Reproduction report: PARTIALLY REPRODUCED, root-cause confidence low. Reproduction label:
partial-repro.Two clean checkouts confirm that resident turns do not refresh dynamic tools, while missing-runtime resume forwards them. The mocked compact check retains BB’s MCP attachment. Each checkout passed 1 host characterization test and 78 provider tests; actual Claude ToolSearch loss after reconnect/compact remains unverified.
Root cause: the initial catalog-loss cause is unresolved; construction-time attachment is only a possible persistence mechanism. No PR: the end-to-end bug was not reproduced, so a production fix would be speculative.
SawyerHood commentedon Sep 14, 2026
Canonical tracker for the identical incident reports #3624 and #3625, which are being closed as duplicates. Their independent reproduction reports remain useful evidence: simulated compaction retained the MCP attachment, but live Claude ToolSearch loss after reconnect/compaction was not reproduced. Keep the omitted-at-attach versus deferred-catalog-loss hypotheses separate; no root-cause fix is established. Related older #2384 and #2532 have different triggers and remain separate.
SawyerHood commentedon Oct 20, 2026
Related evidence from #5843, linked after the daily backlog sweep at the maintainer's request. That report observes missing bb-bridge tools after a plugin reload coincides with session attachment; later resident turns do not repair them, while
bb thread stopfollowed by a new turn does.Its reproduction report (https://get-bb.github.io/reports/issues/5843.html) verifies that the daemon skips resumption for resident threads and does not forward updated dynamicTools. Explicit resume already makes Claude compare tool snapshots and rebuild. The live reload race itself remains unverified.
Coordinate the resident-refresh implementation and reuse this evidence here. Do not assume it proves the initial compact/reconnect catalog loss in #3626: simulated compaction retained attachment. Keeping #5843 open preserves its distinct reload acceptance case. #5479 additionally reports stale schemas surviving stop/resume, while #5359 asks for live ACP updates without reconstruction.