Skip to content

cmux-next: suggested follow-up tasks become a setting - #21897

Merged
teamleaderleo merged 70 commits into
feat-cmux-nextfrom
feat/next-suggestions
Oct 21, 2026
Merged

teamleaderleo merged 70 commits into
feat-cmux-nextfrom
feat/next-suggestions

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #21896 (full-access switch). Until that lands, this diff includes its commit.

Summary

The Debug Settings toggle agent.suggestedTasks becomes a real setting: Suggest Follow-Up Tasks (sessions.promptSuggestions, off by default as before), under Settings > Agents > Agent Sessions. When it's on:

  • agents get the cmux-sessions tools (ACPMUX_OFFER_TOOLS=1 for the next acpmux daemon this app starts);
  • the pages show the tasks they suggest, which start as child chats.

The Debug toggle still turns it on too.

  • AgentPaneSuggestedTasks follows the setting through Observation. It keeps a thread-safe copy (forNextDaemon) that AcpmuxHost reads each time it starts a daemon.
  • CmuxNextApp doesn't grow. The composer-settings observation sets the two Debug-owned slider fields in one line, which covers the one line of wiring.
  • Agents can't set the key (userOnly), because turning it on gives every agent tools that start child chats.
  • New strings are translated into all 21 locales.

Testing

  • The fleet export step built the package and its tests, and the exports are committed (6da0205).
  • package-test-lane.sh suite at 6da0205 passed AgentPaneSuggestedTasksSettingTests, AcpmuxOfferToolsTests and SettingsSchemaExportTests.
  • Not run: a live daemon started with the setting on.

Changelog

Added: A setting lets agents suggest follow-up tasks that start as child chats.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Makes suggested follow-up tasks and full-access modes real settings under Settings > Agents > Agent Sessions.

Suggest Follow-Up Tasks (sessions.promptSuggestions, off by default) gives agents the cmux-sessions tools and shows their suggested tasks, which start as child chats. Allow Full-Access Modes (sessions.allowFullAccess, on by default) refuses switching into modes that skip approvals — bypass permissions, full access, yolo, auto-approve.

  • The Debug Settings agent.suggestedTasks toggle still turns suggestions on, written at once so even a daemon prewarmed at launch gets it.
  • acpmux enforces sessions.allowFullAccess server-side for every client and chat: new chats and resumed chats downgrade to default, session/set_mode and config options into full access are refused, and an unreadable settings file fails closed.
  • Resumed and pooled chats that can't leave full access stop rather than run; a full-access parent's child starts outside it. Profiles that pin a mode in their argv are exempt.
  • acpmux and the app recognize full-access mode IDs with the markers in cmux-tui/spec/full-access-modes.json, and the Swift transport answers the page first with the same localized refusal text.
  • Agents can't set either key: promptSuggestions is user-only, allowFullAccess is destructive.
  • String catalogs and MDM/schema exports are regenerated; new strings are in all 21 locales.

Written for commit 0f4fdca. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 4 commits October 19, 2026 02:46
…cess)

New Settings > Agents > Agent Sessions row, "Allow Full-Access Modes", on by
default (today's behavior and Lawrence's 2026-10-07 call: no sheet for full
access). Off, the agent pane's transport refuses a switch into a mode that
skips approvals (bypass permissions, full access, yolo, auto-approve), by
session/set_mode or the mode config option, before it reaches acpmux; the
page shows "Full-access modes are turned off in Settings."

- AgentPaneModeConfirmation.isFullAccess uses the mode picker's warning-color
  rule (unrestricted, ComposerPickers.tsx).
- The transport reads the setting per frame; AgentPanePageSettings wires it
  to every pane. Its three plain observations share one observe helper, which
  pays for the wiring (CmuxNextApp source 7 lines under the base).
- Agents may not set the key (destructive). Help states the default. Strings
  in all 21 locales of the settings and agent pane catalogs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tSuggestions)

New Settings > Agents > Agent Sessions row, "Suggest Follow-Up Tasks" (off by
default, as the Debug Settings toggle was). On, agents get the cmux-sessions
tools (ACPMUX_OFFER_TOOLS=1 for the next acpmux daemon this app starts) and
the pages show their suggested tasks, which start as child chats. The Debug
Settings toggle agent.suggestedTasks still turns it on.

- AgentPaneSuggestedTasks follows the setting through Observation and keeps a
  thread-safe copy (forNextDaemon) that AcpmuxHost reads at each daemon start.
- The composer observation sets its two Debug-owned slider fields in one line,
  which pays for the wiring (CmuxNextApp does not grow).
- Agents may not set the key (userOnly). Strings in all 21 locales.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated only: fleet export step at this branch's previous head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Generated only: fleet export step at this branch's previous head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0a68eb07-8f86-4170-b67c-a89ecb0a9e76

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Bead cx-cwn18 created for this PR by the cmux coordinator.

teamleaderleo and others added 2 commits October 19, 2026 03:55
…d client

Review of #21896: the pane's transport saw only explicit set_mode frames.
acpmux picks a new chat's start mode itself (the latest pick, a preset, the
setting), replays a saved mode on resume, and serves the CLI directly, so a
bypass pick or a resumed chat still ran in full access, and a full-access
mode exposed under another config id passed.

acpmux now reads sessions.allowFullAccess from the settings file (the same
read as agents.defaultPermissionMode; an unreadable file fails closed):
- start_level: full access becomes the harness's own mode while it is off,
  whatever chose it (a pick, config.json, the setting, the default);
- Hub::forward refuses session/set_mode to a FULL_ACCESS_MODES id and
  session/set_config_option whose value is one, for any client
  (reason full_access_off);
- replay_config skips a saved full-access mode or config value on resume.
The Swift transport still answers the page first, now on any config option's
value too. Profiles that pin a mode in their argv (--dangerously-skip-
permissions) are outside this: acpmux sets no mode over them.

Tests: acpmux tests/full_access_setting.rs (new chat, set_mode, a config
option, unreadable file, back on and off again); a Swift relay case for a
non-mode config id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	docs/mdm/com.manaflow.cmux.plist
#	docs/mdm/managed-preferences.md
#	schemas/settings-export/settings-schema.sources.sha256
#	schemas/settings/settings-schema.json
@teamleaderleo
teamleaderleo temporarily deployed to cmux-tui-merge-tree October 19, 2026 04:04 — with GitHub Actions Inactive
@teamleaderleo

teamleaderleo commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator Author

Visual preview of 10ad09f: in the maintainers' private review feed.

teamleaderleo and others added 3 commits October 19, 2026 04:20
…ccess id

A Claude chat saved in bypassPermissions respawned with it while
sessions.allowFullAccess was off, and ids like danger-full-access or
auto-approve passed acpmux. Red before the next commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ll-access rule for acpmux and the app

Claude respawns with its saved --permission-mode, so the resume path now
downgrades a full-access mode to default (and records it) while
sessions.allowFullAccess is off, as ACP replay already did. acpmux and the
app match full-access ids with one rule from cmux-tui/spec/full-access-modes.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo and others added 12 commits October 19, 2026 06:42
# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextSettings/Localizable.xcstrings
#	schemas/settings-export/settings-schema.sources.sha256
#	schemas/settings/settings-schema.json
#	webviews/src/agent-session/acpmux/generated/strings.json
#	webviews/src/pages/settings/generated/strings.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- regenerated Packages/macOS/CmuxNext/ci-target-graph.json
- vp fmt webviews/src/agent-session/acpmux/replyHref.ts
- vp fmt webviews/src/pages/markdown/README.md
- vp fmt webviews/src/pages/markdown/links.ts
- vp fmt webviews/test/markdown-cmux-app-links.test.ts

Autofix-Run: https://github.com/manaflow-ai/cmux/actions/runs/39215281519
# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextSettings/Schema/SettingsSchema+AgentPolicy.swift
#	docs/mdm/com.manaflow.cmux.json
#	docs/mdm/com.manaflow.cmux.plist
#	docs/mdm/managed-preferences.md
#	schemas/defaults/cmux-next.json
#	schemas/settings-export/settings-schema.sources.sha256
#	schemas/settings/settings-schema.json
#	webviews/src/agent-session/acpmux/replyHref.ts
#	webviews/src/pages/markdown/links.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pane's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…icks included

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…/next-suggestions

# Conflicts:
#	Packages/macOS/CmuxNext/Sources/CmuxNextApp/AgentPanePageSettings.swift
#	Packages/macOS/CmuxNext/Sources/CmuxNextSettings/Schema/SettingsSchema+AgentPolicy.swift
#	schemas/settings-export/settings-schema.sources.sha256
#	schemas/settings/settings-schema.json
#	webviews/src/pages/settings/generated/strings.json
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo and others added 4 commits October 20, 2026 19:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ngs added to it

The merge kept this branch's stale exports, string catalogs and target graph.
Take feat-cmux-next's and add only this PR's two strings and graph edge; the PR
autofix regenerates the settings exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The setting wrote forNextDaemon only from its observation task, and AgentTabs
prewarms a daemon before that task runs, so a cold start could miss
ACPMUX_OFFER_TOOLS=1. The setter now writes it at once, AcpmuxHost also reads the
Debug toggle directly, a released instance cancels its observation and never
writes the shared flag, and the page settings hold the controller weakly. The
tests check the flag at once, back off, and with a released instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e autofix's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
#21896 (sessions.allowFullAccess) landed on the base: its files take the
base side. Kept from this branch: phone.newDevices and the Allowed Phones
card, and sessions.promptSuggestions (#21897). The Accounts category keeps
the phones trail next to the base Mobile category; the generated exports
take the base side for autofix to regenerate.

Agent-Session: live-reload-loop-dd (cosmic-gray 76d6c13f)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in between

Other suites write the same static flag from their observations, which can
only interleave at a suspension, so the post-yield checks could flake.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / nightly-guards / workflow-guard-tests / release-notary is red on 15 of 18 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

cmux-next guards / defaults-snapshot is red on 24 of 24 fresh feat-cmux-next PR heads in the last 2:00:00, so it is most likely a base red, not this PR's. The base-reds lane has it; a base merge picks up the fix once it lands.

@teamleaderleo
teamleaderleo merged commit 5abfe87 into feat-cmux-next Oct 21, 2026
@teamleaderleo
teamleaderleo deleted the feat/next-suggestions branch October 21, 2026 07:40
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

merge-audit: #21897 merged at 0f4fdca without no SHIP review receipt on the head; no risk tier label. #23173 reverts it. To keep this change, add the missing evidence for 0f4fdca here; the next audit pass then closes #23173. Otherwise review and land #23173.

teamleaderleo added a commit that referenced this pull request Oct 21, 2026
#21896 and #21897 are merged: their files take base. Settings > Accounts
keeps base Messages Server group plus the Allowed Phones trail; the
string catalogs keep base and add this branch new phone keys only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo teamleaderleo added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…hey land (#23249)

* test: base autofix regenerates the settings exports on the newest tip, or holds them

Cases for the settings-export livelock: exports made at SETTINGS_MADE_AT land on a
tip that did not move their inputs after it, an export made before its inputs moved
never lands, a made-at commit outside BASE..tip holds them, an export someone else
already made current on the tip is dropped without failing the run, the Mac
regeneration retries on the newest tip at most N times and then holds and errors,
and only a commit's subject marks it as base autofix's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue

* base autofix: regenerate the settings exports on the newest tip, so they land

A run takes about 28 minutes and feat-cmux-next takes a push about once a minute,
so some push nearly always moved a settings-export input after the run's SHA, and
base-autofix-push.sh held the exports on every run: they never landed (9 stale
sources on the tip, #21897's sessions.promptSuggestions among them).

- The Mac action-exports job regenerates the settings exports through
  base-autofix-settings-exports.sh: after each regeneration it reads the newest
  tip, and when the tip moved the settings inputs since the commit it made them
  at, it checks that tip out and makes them again, at most 3 times. It outputs
  settings_made_at. When the inputs still moved after the third, it hands on no
  settings export, prints ::error and fails the job.
- base-autofix-push.sh takes SETTINGS_MADE_AT and judges the settings exports
  from it instead of the run's SHA: input moves and newer writes since then, and
  it lands every export file whose made copy differs from the tip's. A made-at
  commit outside BASE..tip holds them. An export made from inputs that changed
  after it is never landed as it is.
- When the settings exports would wait but the tip's own stamp is current
  (defaults_guard.py check-stamp), they are dropped from the repair and the run
  does not fail for them.
- Only a commit's subject marks it as base autofix's own; a body quoting one
  no longer hides a lane's write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue

* test: base autofix fails closed when it can't read what moved after SETTINGS_MADE_AT

Review of #23249: a failed diff or area read on SETTINGS_MADE_AT..tip must never read
as "the settings did not move"; a SETTINGS_MADE_AT that is a real commit off the
branch holds the exports with an error even when the tip's stamp is current; and
the slow settings step can't cost the action exports their upload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue

* base autofix: fail closed on unreadable settings moves, and time-box the settings step

- base-autofix-push.sh reads SETTINGS_MADE_AT..tip's diff and its input areas as
  separate steps and fails the run on either (with pipefail, a failed diff made
  grep read nothing and pass as "settings did not move"). input_areas now returns
  the areas script's status.
- An invalid SETTINGS_MADE_AT holds the settings exports with ::error and never
  takes the stamp-current drop.
- base-autofix-settings-exports.sh counts a failed diff or area read as moved,
  and removes its temp dir on EXIT.
- The Mac settings step gets timeout-minutes: 40 (the job has 60), so a slow
  regeneration fails only that step and the artifact upload still runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15c6d-a1d2-7fc2-9458-92c6bdcb7b4d&host=huge-blue

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo teamleaderleo added risk:high Risk tier (docs/ci/risk-tiers.md) and removed risk:normal Risk tier (docs/ci/risk-tiers.md) labels Oct 21, 2026
@teamleaderleo teamleaderleo added risk:normal Risk tier (docs/ci/risk-tiers.md) and removed risk:high Risk tier (docs/ci/risk-tiers.md) labels Oct 21, 2026
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Risk tier back to risk:normal, which is what scripts/ci/risk_tier.py classify gives for this PR's merged files (5abfe87). I set risk:high earlier because of a report that this diff carries #21896's sessions.allowFullAccess enforcement in acpmux. It doesn't: none of its 9 files are in acpmux, and that enforcement is in #21896. The one defect the review found was that the setting couldn't turn suggestions off, because it was ORed with the default-on Debug toggle agent.suggestedTasks. #23284 fixes that forward.

teamleaderleo added a commit that referenced this pull request Oct 21, 2026
…nst current base (#23239)

Fleet step ca52be5436a9 (scripts/measure/export-settings-artifacts.sh) at ef4dfa4, then defaults_guard.py snapshot. Brings in sessions.promptSuggestions (#21897), tabs.terminalFirst, workspaces.newPlacement afterCurrent (#23014) and the key.markdownReload / key.sidebar.priorityView.toggle defaults.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

teamleaderleo added a commit that referenced this pull request Oct 22, 2026
…ff (#23284)

* fix(cmux-next): let sessions.promptSuggestions turn suggested tasks off

#21897 added the setting but ORed it with the agent.suggestedTasks Debug
toggle, which #22089 had made default on, so turning the setting off did
nothing. The setting now decides and defaults on (today's behavior); the
Debug toggle defaults off and only forces suggestions on. The host's
default closure reads forNextDaemon alone, which already carries both.

The old test compared isOn to the Debug toggle's value, which hid the
bug; the new one turns the setting off and expects suggestions off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-5eec-7700-94d7-9a3a1f7d889a&host=cosmic-gray

* Say the setting decides suggested tasks in the webview comments

The comments still called the Debug toggle on by default; it is now a
force-on, and Settings > Suggest Follow-Up Tasks decides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-5eec-7700-94d7-9a3a1f7d889a&host=cosmic-gray

* chore(next): PR autofix: regenerate the settings exports

From the cmux-next PR autofix artifact (run 39623858039): the exports now
list sessions.promptSuggestions with default true, plus base's stale
agents.subsessions.answerQuestions row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-5eec-7700-94d7-9a3a1f7d889a&host=cosmic-gray

* docs(next): suggested tasks comments name the setting, not only the Debug toggle

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-5eec-7700-94d7-9a3a1f7d889a&host=Air-Blue

* test(next): the suggested tasks test names the setting, not only the Debug toggle

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-5eec-7700-94d7-9a3a1f7d889a&host=Air-Blue

* chore(next): PR autofix: regenerate the settings exports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a15cfc-5eec-7700-94d7-9a3a1f7d889a&host=Air-Blue

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Fixed forward by #23284 (merged as 9fe0c23) instead of reverting with #23173, which is now closed. The setting now decides; the Debug toggle can only force suggestions on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant