Repository navigation
Description
Summary
bb thread spawn --plan (and bb thread tell --plan) prefixes the message with the builtin /plan command for every provider, without consulting the provider's declared plan composer action. For a provider that declares no plan support — provider-pi declares composerActions: [] — the flag is accepted, no plan mode is entered, no plan approval card appears, and nothing tells the user. The message simply reaches the agent as the literal text /plan …. The UI path is gated correctly; only the CLI path is not.
Versions and environment
- bb 0.43.1 desktop app (
desktop-v0.43.1), macOS 26.5.2 (25F84) - pi 0.85.1 (
provider-pi) - claude 2.1.274 (
provider-claude-code, used as the positive control) - codex 0.154.0 installed, not tested — the account hit its weekly Codex limit mid-investigation (
provider/rate-limit, resets 2026-09-19) - Default personal workspace environment, local host, no Connect, no worktree
Steps to reproduce
bb thread spawn --project <id> --provider pi --plan --prompt "Plan adding HELLO.md to the working directory. Create nothing until I approve."bb thread log <thread-id> --jsonand look for asystem/interaction/lifecycleevent withpayload.subject.kind == "plan".- Repeat step 1 with
--provider claude-codeas a control. - Repeat step 1 with the
ask-user-questionplugin disabled (bb plugin disable ask-user-question) to rule the AskUserQuestion tool description in or out.
I ran all four. The provider-pi case produces no plan interaction; the claude-code case produces one; disabling the plugin changes neither.
Did not reproduce with: --provider claude-code, which enters plan mode and calls ExitPlanMode as expected.
Expected vs actual
provider-pi — actual. bb thread show reports the thread as started normally and the thread title falls back to the raw command text:
"titleFallback": "/plan Спланируй добавление файла HELLO.md в текущий рабочий каталог. Ничего не н..."The turn completes with no plan interaction at all (bb thread interactions list <id> → empty) and no error anywhere. The agent's own reasoning shows the flag landed as text it could not act on:
Plan mode? The command /plan suggests plan mode. But I don't have EnterPlanMode tool listed.
Just respond with one paragraph.
Run with the ask-user-question plugin disabled, the same flag produces a different and equally non-plan outcome — the agent reads it as prose:
The /plan command is likely a prompt template.
provider-claude-code — control, same flag. Real plan mode: a pending approval interaction with the plan text and CC's own plan file, driven by two tool calls.
system/interaction/lifecycle
status=pending kind=approval subject=plan
planFilePath=/Users/lennox/.claude/plans/hello-md-elegant-cook.md
origin.providerId=claude-code
toolCall: ToolSearch query="select:ExitPlanMode" → "Matched tools: ExitPlanMode"
toolCall: ExitPlanMode { plan: "# План: добавить HELLO.md…" }
Expected. Either the flag is refused for a provider that cannot plan ("provider-pi does not support plan mode" and a non-zero exit), or the plan request is emulated. What should not happen is accepting --plan and producing neither a plan nor a diagnostic.
Evidence
Threads (all archived; artifacts kept):
thr_wjwduagtvj— pi,--plan, ask-user-question enabled → no plan interactionthr_8vwu9e79id— pi,--plan, ask-user-question disabled → no plan interactionthr_dqkz5ijm5e— claude-code,--plan→ExitPlanMode, plan approval pendingthr_pmky8bmv76— claude-code,--plan, ask-user-question disabled →ExitPlanMode, plan approval pending
All four in project proj_personal on host host_e9rkkmpe25. No file was created in any of the four workspaces (HELLO.md never existed; the plan was denied or never proposed).
Code on main at 3e9bef842539d5a1dd83d648fe9d5a7a20de4397:
provider-pideclares no plan support: https://github.com/get-bb/bb/blob/3e9bef842539d5a1dd83d648fe9d5a7a20de4397/plugins/provider-pi/src/declaration.ts —composerActions: [](same forplugins/provider-acp/src/declaration.ts), againstcomposerActions: ["plan"]inplugins/provider-claude-code/server.tsand["plan", "goal"]inplugins/provider-codex/server.ts.- The server side gates correctly:
resolvePromptModereturnsundefinedwhen the provider has no plan composer action — https://github.com/get-bb/bb/blob/3e9bef842539d5a1dd83d648fe9d5a7a20de4397/apps/server/src/services/threads/thread-commands.ts (resolvePromptMode, viaresolveProviderPlanCommandinapps/server/src/services/providers/provider-plan-command.ts). So nopromptModeis ever sent to the pi bridge — which is why the run is a silent no-op rather than a broken plan. - The CLI never asks:
--planis defined inapps/cli/src/commands/thread/spawn.tsandapps/cli/src/commands/thread/actions.ts, andapps/cli/src/commands/thread/helpers.tsturns it into command text unconditionally —args.plan ? createBuiltinPlanCommandTextInput(args.message), next to the help string"Send the message as the provider's /plan action so the agent proposes a plan for approval before executing". - The UI is gated:
packages/client-core/src/prompt/effective-prompt-mode.tsrequiresplanModeCopy !== undefined, whichprovider-pidoes not declare, and the composer typeahead is built fromcomposerActions(packages/client-core/src/prompt/mentions/command-trigger.ts). That asymmetry is the whole report: the same flag that the composer hides forprovider-piis accepted from the CLI.
Upstream pi has no plan mode to translate to: pi's README states "No plan mode." (README.md in @earendil-works/pi-coding-agent, both in its feature list and its "what pi skips" section). provider-pi's host bundle reads promptMode nowhere; the identifier appears only in the shared protocol schema it re-exports.
Investigation thread: thr_uee6xpjqgp. Raw bb thread log --json dumps for all four runs are attached to this report locally at $BB_THREAD_STORAGE/planmode-test/ (piA.json, piB.json, ccA.json, ccB.json).
What you ruled out
- Not a duplicate of ACP providers can't use plan mode: supportsPlan is never declared or translated from session modes #3019: that one asks for paintable ACP providers (
acp-omp) to be un-gated so/planworks. This is the opposite direction — a provider with no plan mode at all should not accept a plan request silently. Both could be closed by the same capability check, but the symptoms and the fix surface differ (CLI flag validation vs ACP session-mode translation). - Not a duplicate of Codex Plan mode: persistent planning with inline proposal review #3411 (codex plan mode persistence) — unrelated provider and unrelated symptom.
- Not a model failure: no plan interaction is ever created for
provider-pi, regardless of model behavior, becausepromptModeis never set for a provider withcomposerActions: []. - Not the
ask-user-questiontool description: disabling that plugin entirely leaves both outcomes unchanged. - Verified on the latest release (
desktop-v0.43.1). Not run onmain— no source checkout on this machine, desktop build only.
Suggested priority and effort
Low–Medium. No work lost and no crash; the failure is silence, which is the expensive part: a script or automation that starts threads with --plan against provider-pi (or any ACP provider) gets a thread that looks fine and never asks for approval. Workaround: check the provider's composerActions before passing --plan. Effort: Low — the server already resolves the plan command per provider, so the check just has to reach the CLI flag.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 17, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotBug · Priority: Medium · Effort: Low
Labels:
providers,cli,provider-pi,provider-acp,confirmed-repro.Reproduction and root-cause report — REPRODUCED, high root-cause confidence. The same focused test failed in two clean checkouts of trusted main: a structured plan request produced a normal Pi start command instead of rejection. Live model/UI behavior was not exercised; 87 relevant existing tests passed.
The CLI constructs plan input unconditionally; the server omits unsupported plan mode without rejecting the request.
No PR: the assessed complete fix, regression coverage, and required CLI documentation updates span six files, exceeding this rule’s five-file limit.
Reject --plan for providers without a plan action (#6473)