fix(cmux-next): let sessions.promptSuggestions turn suggested tasks off
Fix forward for #21897, whose merge-audit revert is #23173.
Takes back #23173: #21897 was reverted because its setting could not turn suggestions off (the Debug toggle, on by default, was ORed in). This PR makes the setting decide, so the reason for the revert is gone.
Takes back #22089: it made the Debug toggle agent.suggestedTasks on by default, and that toggle was ORed in, so the setting could not turn suggestions off. The default now lives in the setting sessions.promptSuggestions (still on), and the toggle only forces suggestions on, so default behaviour is unchanged.
#21897 added sessions.promptSuggestions, but ORed it with the agent.suggestedTasks Debug toggle in two places: AgentPaneSuggestedTasks.isOn and AcpmuxHost's default offersSessionTools. #22089 had made that toggle default to on, so turning the setting off did nothing. #21897's test compared isOn with the toggle's value, which hid the bug.
What changes:
sessions.promptSuggestionsnow defaults to true, so the default behavior is the same as today. I regeneratedSettingsSchema+Sessions.generated.swiftwithscripts/cmux-next/gen-settings-sources.py.agent.suggestedTasksnow defaults to false and is renamed "Force suggested tasks on": the setting decides, and the toggle only forces suggestions on.AcpmuxHost's default closure now readsAgentPaneSuggestedTasks.forNextDaemonalone. That flag already holdsisOn, so the second OR is gone.- Until the App wires the setting,
forNextDaemonandsettingstart at the setting's default instead offalse. - Tests: a new test turns the setting off and expects suggestions off. It fails on the base branch and replaces the
isOn == debugOncheck.AcpmuxOfferToolsTestsnow builds its host the way the app does (setting OR toggle).
Exports and the defaults guard:
schemas/settings/settings-schema.json,schemas/defaults/cmux-next.jsonand the docs/mdm exports come from a Swift test. The last commit applies the PR autofix's patch artifact at the final base merge (run 39705775066), so they listpromptSuggestionswithdefault: true.- The effective default does not change. Suggestions were already on for everyone through the
agent.suggestedTasksDebug tunable (on by default since #22089), which overrode the setting's oldfalse. They stay on by default; the setting now just decides. - The defaults guard lists
setting.sessions.promptSuggestionsas a changed default; since #23761 a SHIP receipt at the head clears it. - The webview comments now say the setting decides and the Debug toggle forces suggestions on. The page still gets one
suggestedTasksbool.
No capture: no layout or styling changes. The suggested-tasks card is the same card; the only visible changes are that turning Settings > Suggest Follow-Up Tasks off now hides it, and the Debug Settings row's label and help text.
Note: a nightly user who had explicitly turned the Debug toggle off will see suggestions come back on, because that override no longer forces anything off. To turn them off, use Settings > Suggest Follow-Up Tasks.
Note: turning the setting off hides the card at once, but a daemon that is already running keeps offering the session tools (ACPMUX_OFFER_TOOLS=1) until it restarts.
No local build or tests (Leo's Macs never build); CI and cmux-ci compile-check --app compile and run the suites.
Agent session: Air-Blue
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the forward for the reverted #21897 so sessions.promptSuggestions can actually turn suggested tasks off. The setting was ORed with the agent.suggestedTasks Debug toggle, which #22089 had made default on, so turning the setting off did nothing.
sessions.promptSuggestionsnow defaults to true and decides alone;agent.suggestedTasksdefaults to false and only forces suggestions on. Default behavior is unchanged, andAcpmuxHostreadsAgentPaneSuggestedTasks.forNextDaemonalone. Until the App wires the setting,forNextDaemonandsettingstart at the setting's default.- The regenerated exports pick up base's stale
agents.subsessions.answerQuestionsrow. - The old test compared
isOnto the toggle's value, hiding the bug; the new test turns the setting off and expects suggestions off.
Note: a nightly user who had explicitly turned the Debug toggle off will see suggestions come back on, since that override no longer forces anything off. To turn them off, use Settings > Suggest Follow-Up Tasks.