Skip to content

--plan bypasses the provider plan capability gate: provider-pi accepts it silently and the agent looks for a nonexistent EnterPlanMode tool #3833

Closed

Description

@skillet07

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

  1. bb thread spawn --project <id> --provider pi --plan --prompt "Plan adding HELLO.md to the working directory. Create nothing until I approve."
  2. bb thread log <thread-id> --json and look for a system/interaction/lifecycle event with payload.subject.kind == "plan".
  3. Repeat step 1 with --provider claude-code as a control.
  4. Repeat step 1 with the ask-user-question plugin 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 interaction
  • thr_8vwu9e79id — pi, --plan, ask-user-question disabled → no plan interaction
  • thr_dqkz5ijm5e — claude-code, --plan → ExitPlanMode, plan approval pending
  • thr_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:

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 /plan works. 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, because promptMode is never set for a provider with composerActions: [].
  • Not the ask-user-question tool description: disabling that plugin entirely leaves both outcomes unchanged.
  • Verified on the latest release (desktop-v0.43.1). Not run on main — 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

  1. added theissue type on Sep 17, 2026
  2. added
    providers
    cli
    provider-pi
    provider-acp
    confirmed-repro
    on Sep 17, 2026
  3. bb-slop-cop commented on Sep 17, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Bug · 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.

    AGENT GENERATED

  4. added a commit that references this issue on Oct 28, 2026
    c9cb18d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliconfirmed-reproprovider-acpprovider-piproviders

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions