fix(web): only surface opencode plan agent with legacy plan mode on - #6420
fix(web): only surface opencode plan agent with legacy plan mode on#6420UtkarshUsername wants to merge 9 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 147f7d9. Configure here.
ApprovabilityVerdict: Needs human review This PR gates agent visibility based on a legacy setting, propagating You can customize Macroscope's approvability policy. Learn more. |

What Changed
The opencode plan agent now only appears in T3's Agent dropdown while legacy plan mode is enabled. With plan mode feature off, the option is removed from the model's capabilities in
getProviderModelCapabilities, so it can't be selected or dispatched. When plan mode feature is on, it shows as before. Threaded through the composer, model settings, and project settings (all share TraitsPicker), and covered by a test that a stale agent: plan selection self-heals to build.Why
T3's plan mode is now a legacy feature and defaults to off, but the opencode plan agent still showed up in the dropdown regardless. Gating the option on the same planModeEnabled client setting keeps the two in sync.
Screenshots
Before:

Plan mode is an option even when it is disabled in settings
After:

Plan mode is not an option when disabled in settings
Checklist
Note
Hide plan agent options in chat composer and settings when legacy plan mode is off
planModeEnabledas a parameter throughgetProviderModelCapabilities,getComposerProviderState,TraitsPicker, andTraitsMenuContentso the plan agent option is excluded from capabilities, selections, and UI controls when plan mode is disabled.withoutPlanAgentSelectionin modelSelection.ts to sanitize persisted model selections, and calls it when the user disables legacy plan mode to remove any stored plan agent choice.agent: planoption from savedtextGenerationModelSelectionandsourceControlWriterModelSelectionsettings.Macroscope summarized 5ce1d4b.
Note
Low Risk
Client-side gating of a legacy model option and settings cleanup; no auth or data-path changes, with unit tests for dispatch and selection sanitization.
Overview
Hides the opencode “plan” agent unless legacy plan mode is enabled, so the Agent dropdown and dispatched model options stay aligned with Settings → Beta → Plan mode (legacy).
getProviderModelCapabilitiesnow strips theagent: planoption (and drops the agent descriptor when plan was the only choice) whenplanModeEnabledis false. That flag is threaded through the composer traits UI,getComposerProviderState, and settings/project model pickers. Composer dispatch falls back to build instead of sending a stale plan selection, and turning plan mode off also scrubsagent: planfrom stored text-generation and source-control writer selections viawithoutPlanAgentSelection.Reviewed by Cursor Bugbot for commit 5ce1d4b. Bugbot is set up for automated code reviews on this repo. Configure here.