Skip to content

cmux-next Chief: Subagents menu rows run chief.openSubagent, not an inline selector - #23073

Merged
teamleaderleo merged 3 commits into
feat-cmux-nextfrom
cmux/chief-subagents-menu-action
Oct 21, 2026
Merged

teamleaderleo merged 3 commits into
feat-cmux-nextfrom
cmux/chief-subagents-menu-action

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

check-menu-actions.py (the "Menu rows run registered actions, not inline selectors" step of cmux-next guards) fails on feat-cmux-next because the Chief pane's Subagents menu built its rows with an inline #selector(openSubagent(_:)). This PR makes each row run a new registered action, chief.openSubagent, so that check passes. The rows behave the same as before.

  • New action: chief.openSubagent ("Open Chief Subagent") goes in SidebarSectionActionCatalog. Its target is the subagent row's sidebar item (sidebar-item:<id>). It is exempt from the palette and CLI verb as focusMove, like home.openConversation. Its title is translated into the catalog's 21 languages.
  • Binding: ChiefSidebar.bind binds it to the existing activate(LayoutItemID(target.id), registry:) path, the same path a click on the sidebar row takes.
  • Menu rows: ChiefPaneTools.subagentsMenu() builds each row through registry.makeContextMenu, then sets the subagent's own title and status tooltip, with no icon and no key. The @objc openSubagent selector is gone.
  • Behavior: a row is now enabled only while the action is bound and allowed by policy. In the app it is always bound, so nothing visible changes.
  • Generated files: the action exports (plans/cmux-next/action-surfaces.json, actions.md) are regenerated by PR autofix on a Mac runner, not by hand.

Testing

  • Red, on base 92d14b2: python3 scripts/cmux-next/check-menu-actions.py fails on ChiefPaneTools.swift, the same failure as the base red.
  • Green, on head: the same command passes with "38 inline menu rows in 29 baselined files, none new".
  • New test: HomeDockTabRowToolsTests.eachSubagentRowOpensItsSessionThroughTheRegisteredAction (commit 1). It checks through ActionRegistry.menuRun(of:) that each row runs chief.openSubagent on its own sidebar-item:<row id> with no arguments, and that each row keeps its title and tooltip.

Observed / Not run

  • Observed: check-menu-actions.py passes, prepush-gate.py reports no new violations and check-no-godfiles.sh passes on the changed files. localization_catalog.py check fails exactly as it does on base, with no error in the files changed here.
  • Not run: no Swift compile or tests locally (Mac compiles run on CI). The new test, ActionSurfaceParityTests and ActionContractTests run on CI.

Changelog

none

Agent session: huge-blue

🤖 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

The Chief pane's Subagents menu rows now run the registered chief.openSubagent action through the action registry, instead of an inline selector, so the check-menu-actions.py guard passes. Rows behave identically to before.

  • New chief.openSubagent action binds to the same activation path as a click on the sidebar row; its target is the row's sidebar-item:<id>, and it is exempt from the palette and CLI verb as focusMove.
  • Menu rows are rebuilt from the registry, then retitled with the subagent's own title and status tooltip, with no icon or key.
  • Added tests asserting each row runs the action on its own row's sidebar item with no arguments, and that the action is not a palette row.
  • A row is enabled only while the action is bound and allowed by policy; in the app it is always bound, so nothing visible changes.

Written for commit 2b76082. Summary will update on new commits.

View guided diff Turn on auto-fix

teamleaderleo and others added 2 commits October 21, 2026 06:33
…ubagent

The Chief pane's Subagents menu (#22852) builds its rows with an inline
selector, which scripts/cmux-next/check-menu-actions.py rejects:
  ChiefPaneTools.swift: 1 inline menu row(s), 0 allowed
This test pins the shape the fix gives the rows: each runs the registered
chief.openSubagent action on its row's sidebar item, titled and described
like its sidebar row.

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
…nline selector

check-menu-actions.py was red on base: #22852's ChiefPaneTools.subagentsMenu
built each row with its own #selector(openSubagent(_:)), a menu-only path
beside the registry. Each row now comes from
ActionRegistry.makeContextMenu(for: .sidebarItem, target:, entries:) and runs
the new chief.openSubagent action on the row's sidebar item (target
sidebar-item:<row id>), retitled to the subagent as menuRun's callers do.
ChiefSidebar binds the action to the same activate path a click on the
sidebar row runs: reveal the subagent's tab, else open a workspace on it.
Title and tooltip are unchanged; the row has no icon and no key equivalent.
Palette, CLI verb and right-click are exempt as focusMove (it shows an
existing subagent; `cmux action run chief.openSubagent --target
sidebar-item:<id>` reaches it). Generated action exports are left to the
autofix.

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
@teamleaderleo teamleaderleo added the risk:low Risk tier (docs/ci/risk-tiers.md) label Oct 21, 2026
@teamleaderleo

teamleaderleo commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

Owned by land-and-ci-a8 on huge-blue · session

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 2b76082: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr23073 -f ref=cmux/chief-subagents-menu-action -f platform=macos -f backend_mode=local

Not verified: macOS jobs did not run: compile and app tests were skipped on 2b76082600; ci-status is green without them.

CI passes on 2b76082600 (run 39557241522 attempt 1).
macOS jobs did not run: compile and app tests were skipped: Fast static checks skipped (the macos job needs both to succeed). Re-run CI once they pass, before merging.

Written by scripts/ci/classify_failures.py (ci-failure-attribution.yml); signatures are its SIGNATURES table. A machine verdict is the runner's fault, not this PR's; yours means the failing file is one this PR changes, also red on main that main's latest full suite fails the same way, seen on other PRs that it failed on another pull request's run lately.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

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

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/39558816819 at c7ce585 failed: cmux-next Release compile (Xcode 26).
Those jobs last passed at 233cc81. This pull request is one of 4 merged since: #23065, #23050, #23073, #22992.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

@github-actions

Copy link
Copy Markdown
Contributor

The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/39559424526 at 240de48 failed: cmux-next Release compile (Xcode 26).
Those jobs last passed at 233cc81. This pull request is one of 5 merged since: #23065, #23050, #23073, #22992, #23062.
If the failure is in your change, fix forward on feat-cmux-next. Pull requests run only the tiers their paths reach (docs/ci/cmux-next-tiers.md); label a batch PR full-ci to run them all before merging.

teamleaderleo added a commit that referenced this pull request Oct 21, 2026
… no target

Follow-ups to #23073. Open Chief Subagent shows a subagent's tab or opens a
workspace on it, so it joins ActionCatalog.focusActionIDs and action.list
reports it as focusing. A run with no target (its shortcut, `cmux action run`
without --target) now refuses through ActionRegistry.refuse, as other
handlers do: a keyboard run shows the reason in the refusal HUD, and the
palette and the control socket get it back. A target that is not a subagent
row refuses as not found. The reason is localized in the 21 locales of the
CmuxNextAgentLanes catalog.

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
teamleaderleo added a commit that referenced this pull request Oct 21, 2026
… no target (#23108)

* test: chief.openSubagent focuses, and a run with no subagent refuses visibly

Two follow-ups to #23073. Open Chief Subagent shows a subagent's tab or opens
a workspace on it, so action.list should report it as focusing; it does not
(ActionCatalog.focusActionIDs lacks it). And a run with no target (its
shortcut, `cmux action run chief.openSubagent` without --target) returns from
the handler without a word: no notice for a keyboard run, no reason for a
caller. These tests pin both.

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

* cmux-next Chief: chief.openSubagent focuses, and refuses visibly with no target

Follow-ups to #23073. Open Chief Subagent shows a subagent's tab or opens a
workspace on it, so it joins ActionCatalog.focusActionIDs and action.list
reports it as focusing. A run with no target (its shortcut, `cmux action run`
without --target) now refuses through ActionRegistry.refuse, as other
handlers do: a keyboard run shows the reason in the refusal HUD, and the
palette and the control socket get it back. A target that is not a subagent
row refuses as not found. The reason is localized in the 21 locales of the
CmuxNextAgentLanes catalog.

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>
@github-actions

Copy link
Copy Markdown
Contributor

Shipped in:

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant