Skip to content

Plan-only Best of N, and build the chosen plan on any provider - #1585

Merged
currentbits merged 4 commits into
mainfrom
coder/plan-mode-best-of-n-parallel-planning-ag-a5cf3c
Oct 11, 2026
Merged

currentbits merged 4 commits into
mainfrom
coder/plan-mode-best-of-n-parallel-planning-ag-a5cf3c

Conversation

@currentbits

Copy link
Copy Markdown
Owner

What changed

Plan-only Best of N. The Best of N options in the Composer have a new Plan only checkbox. When it's on, every fork starts in plan mode, so each provider only drafts a plan and doesn't build anything.

  • A new helper, providerCanPlan in src/bestOfN.ts, checks whether a provider supports plan mode. If a provider doesn't list its permissionModes at all, it is treated as having the full legacy set, so it counts as able to plan.
  • With Plan only on, providers and profiles that have no plan mode are disabled in the picker, with the tooltip "This provider has no plan mode". They're also filtered out of the available ids in both Composer.submitBestOfN and ThreadView.runBestOfN. Without this, main would quietly switch "plan" to default on those CLIs, and that fork would start building.
  • In runBestOfN, Plan only sets each fork's permission mode to plan and overrides the profile's own permission mode. The profile's reasoning effort is still applied.

Build a plan with a different provider. The plan approval card (PlanPrompt) now shows a "Build with provider" dropdown next to Implement in a new thread when more than one provider is installed. The chosen provider is passed through onImplementPlan to forkThread(..., { leavePlan: true, provider }). This means one model can write the plan and another can build it. If no provider is picked, it works the same as before.

Why

Best of N used to compare finished implementations only. With this change you can compare plans from several models, pick the best one from its card, and build it on whichever provider you like.

Tests

  • test/bestOfNComposer.test.tsx: the Plan only toggle and how it affects provider and profile selection.
  • test/planPrompt.test.tsx: the provider dropdown on the plan card and how the chosen provider is passed on.

🤖 Generated with Claude Code

Best of N gets a Plan only toggle: every fork starts in plan mode, and
providers without a plan mode are excluded (main would snap them to
default and they would build). The plan card's 'Implement in a new
thread' gains a provider picker so a plan from one model can be built
by another.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T08:48:55.731588Z 0e5d334 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e5d334294

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Implement in a new thread
</button>
) : null}
{onImplement && installed.length > 1 ? (

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Show the sole installed alternate provider

Show this selector when there is any usable provider other than the source, not only when two providers are currently installed. If a saved plan belongs to a provider that is now unavailable and exactly one other provider is installed, installed.length is 1, so the selector is hidden and the user can only choose “Same provider”; that path then attempts to run the unavailable CLI, preventing the advertised cross-provider implementation flow.

Useful? React with 👍 / 👎.

@currentbits
currentbits enabled auto-merge (squash) October 11, 2026 10:10
@currentbits
currentbits merged commit ce99baa into main Oct 11, 2026
6 checks passed
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.

1 participant