Repository navigation
Description
Summary
On BB 0.39.1-nightly.32633481796.1, a third-party plugin tool selected by bb.agents.configure(...) on the first provider construction is callable, but the same tool is not added when an already-created BB thread is released and resumed after its configure selection changes from false to true.
This reproduces independently on Codex and Claude Code.
Environment
- BB:
0.39.1-nightly.32633481796.1 - BB package gitHead:
7e10ea4b3742f3d14bde086c2963118238fec3ab - Host: Linux, daemon-managed
bb.service - Plugin source: local path
- Providers tested: Codex and Claude Code
Minimal plugin
import { existsSync } from "node:fs";
import { z } from "zod";
const marker = "/tmp/bb-dynamic-tool-resume-enabled";
export default function plugin(bb) {
bb.agents.registerTool({
name: "dynamic_tool_resume_probe",
description: "Return a fixed generic probe result.",
parameters: z.object({}).strict(),
async execute() {
return "DYNAMIC_TOOL_RESUME_OK";
},
});
bb.agents.configure((context) => ({
tools:
context.thread.title.includes("DynamicToolResumeRepro") &&
existsSync(marker)
? ["dynamic_tool_resume_probe"]
: [],
skills: [],
}));
}Reproduction
- Ensure the marker file is absent.
- Spawn Codex and Claude Code threads whose titles contain
DynamicToolResumeRepro. - Confirm the tool is absent on their first turns.
- Create the marker file.
- Run
bb thread stop <id>for each idle test thread. Both commands return{ "ok": true }. - Send a new turn to each same BB thread asking it to call the tool.
- Log the configure callback result. It resolves
selected: truefor the resumed thread.
Actual
- Codex reports
dynamic_tool_resume_probemissing. - Claude Code reports
mcp__bb-bridge__dynamic_tool_resume_probemissing. - Both provider sessions are resumed under their existing provider-thread identities after runtime release.
- The plugin's configure callback runs and returns the selected tool for the resumed turn.
Control
With the marker already present, newly spawned Codex and Claude Code threads both call the tool successfully and receive DYNAMIC_TOOL_RESUME_OK.
This proves registration, selection, tool execution, and both provider encodings work. The defect is specifically the false-to-true tool-set change across release/resume.
Expected
The resumed provider construction should receive the newly selected tool because turn.submit.resumeContext.dynamicTools and both provider bridges expose construction-time dynamic-tool inputs.
If adding tools to an existing provider-thread identity is intentionally unsupported, BB needs an explicit supported contract for rebuilding the provider session with the current configured tool set.
AGENT GENERATED
Activity
uje-m commentedon Aug 25, 2026
Root cause boundary narrowed with a standalone generic plugin:
The callback logs
selected: truefor the failing resumed Codex turn, so the failure is downstream of plugin selection. This is a late-add-on-resume defect, not a general registration or execution failure.[-]Plugin agent tool selected by agents.configure is absent from fresh Codex/Claude session schemas[/-][+]Conditionally selected plugin tool is not added when a released thread resumes[/+]SawyerHood commentedon Aug 27, 2026
Reproduction & root-cause report: https://get-bb.github.io/reports/issues/2384.html
The report has copy-paste repro steps, screenshots where the bug is visual, code permalinks at the base commit, and repro artifacts. It was independently re-run by a second agent (see its Verification section).
karstenisdope commentedon Sep 13, 2026
Another data point on 0.43.1, with a different trigger: a tool added by a plugin update, not a configure flip.
bb.agents.configurecallback returns its tool list for both.bb.agents.registerTooland added it to the configure result, followed each time bybb plugin reload. The first addedcommand_center_record_ruling, and the second addedcommand_center_attach_image.bb thread stop <id>followed by a new turn resumed the same provider session ID, and both new tools were still missing.This matches the root cause in the reproduction report: Codex
thread/resumeignoresdynamicTools. It shows the bug also hits plugin updates, not only configure changes. Any plugin that ships a new tool to a long-lived Codex thread will miss it. We worked around it in the plugin by letting a seat attach through a validated marker in its reply. A history-preserving replacement session, the report's fallback, would fix it for plugin-owned threads like these.Drafted by Claude Code (Liara) from EDI's diagnosis in bb, reviewed by the reporter before posting. Threads on the reporter's machine: the Codex seat thr_ek3fbafj52 and the Claude Code seat thr_xwr8ajpyg3.
uje-m commentedon Sep 14, 2026
Not a duplicate of this issue, but the same construction-time
dynamicToolssnapshot showed up in a different failure: live Claude Code session lost allmcp__bb-bridge__*deferred tools after host-daemon reconnect +/compact, recovered only on process rebuild.Filed separately as #3626 (symptom + unresolved omitted-at-attach vs Claude-index-loss fork) and #3628 (positive capability probe; not implementation-approved).
This issue remains the false→true configure selection on release/resume. Please keep them distinct.
salemsayed commentedon Sep 14, 2026
Confirmed on Linux with BB 0.43.1 and Advisor, using a small local checkout fixture.
advisor_review: it is absent from the callable tool list.advisor_reviewis callable and returns a real review.The fresh-session control caught the seeded arithmetic defect (3 failing tests), then verified the corrected implementation (3 passing tests). The Advisor panel's Review now action also worked while the existing Codex session lacked the tool. We have documented both the workaround and the fact that clearing context resets the agent's working context; it is not a transparent fix.
This supports the existing configure-selection/resume diagnosis. Advisor v0.1.1 documents the limitation and does not claim to fix the provider session contract.
Agent-assisted reproduction and report.
MPIsaac-Per commentedon Sep 27, 2026
Still reproduces on 0.43.3, with the root cause in the Codex app-server protocol. New evidence for this issue.
Versions: bb-app 0.43.3 (npm global install,
desktop-v0.43.3/ e865697), Linux x64, Codex CLI 0.153.3 (codex app-server).Repro against Codex itself, without bb (throwaway
CODEX_HOME):thread/startwithdynamicTools: [native_a], then run one turn.thread/resumethe same thread withdynamicTools: [native_a, added_b].session_meta.dynamic_toolsis still["native_a"], and the resumed model can call onlynative_a. No error is returned.Repro through bb: use the plugin from this issue's body with a Codex thread. After the tool set changes,
bb thread stop <id>and a new turn resume the same provider session, and the added tool is still missing. A brand-new thread gets it immediately.Cause (observed in source):
codex-rs/core/src/session/mod.rsL704-709 atrust-v0.153.3). On resume and fork it restores them from history (codex-rs/history/src/lib.rsL325-336).dynamicToolsexists only onThreadStartParams.ThreadResumeParams,ThreadForkParamsandTurnStartParamshave no such field, and no method updates tools on an existing thread.dynamicToolsonthread/resumeandthread/fork(plugins/provider-codex/src/bridge/bridge.tsL1073-L1087 at e865697f5), and Codex silently drops them.mainat 4354b88 still sends them the same way.apps/server/src/services/threads/thread-runtime-config.tsL92-226), and the callback returns the tool for the resumed turn.Ruled out:
bb thread stopplus a new turn doesn't help;plugins/provider-claude-code/src/bridge/bridge.tsL2058-2064). That differs from what this issue reports for Claude Code, so those comments remain separate.Suggested approach, in prose; patch available if a maintainer approves the direction:
Codex offers no way to update native dynamic tools after
thread/start. On resume, fork and rebuild, the bridge can read the thread's persisted tool set, then serve every configured tool missing from it through a per-session MCP server passed in the resumeconfig(mcp_servers.<name>, with a per-session token). Codex's own TUI serves its task tools the same way (codex-rs/tui/src/dynamic_tools_mcp.rs).codex-rs/core/src/tools/spec_plan.rsL244-265). So the server must setomit_tools_from = ["deferred"]; otherwise the model never sees the tools in its list.CODEX_HOME): after resume, the model's tool list includes the late-added tools asmcp__<server>__<tool>.dynamicToolsonthread/resume, which is worth raising with openai/codex.Workaround: start a new Codex thread;
thread/startreceives the current tool set.