Skip to content

Reject --plan for providers without a plan action - #6473

Merged
ymichael merged 2 commits into
mainfrom
bb/3833-plan-capability-standalone
Oct 28, 2026
Merged

ymichael merged 2 commits into
mainfrom
bb/3833-plan-capability-standalone

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Fixes #3833: CLI spawn/tell --plan produces a structured builtin plan mention, but the server accepted it even when the provider declared no plan composer action. Current main still accepts these requests: the new create regression resolves to a thread, and the send regression resolves to { ok: true, delivery: "sent" } instead of rejecting.

What changed

Thread create and send reject unsupported structured plan requests with HTTP 400 invalid_request and a provider-specific message advising removal of --plan. Creation validates after catalog fallback selects the effective provider. This server gate also covers SDK callers using the same structured command. The CLI messaging guide documents the rejection.

The only intended visible behavior change is rejecting unsupported structured plan requests (including Pi and ACP). Providers declaring plan support still accept them; manually typed /plan text remains literal text. No wire fields, daemon protocol version, or SDK signatures change.

How you verified

  • Added real migrated-database harness tests at both request admission entry points; both fail against main's production code because the requests resolve successfully, and pass with the fix.
  • pnpm exec turbo run test --filter=@bb/server -- test/threads/thread-plan-capability.test.ts test/providers/provider-plan-command.test.ts test/threads/thread-create-seed-without-run.test.ts test/threads/thread-send-dispatch.test.ts: 68 passed across four files.
  • pnpm exec turbo run lint typecheck --filter=@bb/server: successful; the selected tasks include server typecheck (no server lint script).
  • oxfmt and git diff --check passed.
  • Reviewed the final diff using docs/CODE_REVIEW.md and the deslop skill. No outstanding findings. Live provider, UI, and end-to-end CLI execution were not run; the regression uses the same structured input as the CLI against real server request handlers.
  • Production diff: +42/-1; tests: +159; guide: +2/-1.

Fixes #3833

🤖 Generated with Claude Code

AGENT GENERATED

ymichael and others added 2 commits October 28, 2026 13:11
`bb thread spawn --plan` and `bb thread tell --plan` prefix the message
with bb's builtin /plan mention for every provider. The UI only offers
plan for providers whose declaration has a plan composer action, but the
server accepted the mention anyway, so Pi and ACP threads received the
literal "/plan ..." text with no plan mode and no approval card. Thread
create and send now refuse a builtin /plan mention for such a provider
with a 400 naming the provider.

Fixes #3833

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit c9cb18d into main Oct 28, 2026
51 checks passed
@ymichael
ymichael deleted the bb/3833-plan-capability-standalone branch October 28, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant