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: true for the resumed thread.
Actual
- Codex reports
dynamic_tool_resume_probe missing.
- Claude Code reports
mcp__bb-bridge__dynamic_tool_resume_probe missing.
- 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
Summary
On BB
0.39.1-nightly.32633481796.1, a third-party plugin tool selected bybb.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
0.39.1-nightly.32633481796.17e10ea4b3742f3d14bde086c2963118238fec3abbb.serviceMinimal plugin
Reproduction
DynamicToolResumeRepro.bb thread stop <id>for each idle test thread. Both commands return{ "ok": true }.selected: truefor the resumed thread.Actual
dynamic_tool_resume_probemissing.mcp__bb-bridge__dynamic_tool_resume_probemissing.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.dynamicToolsand 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.