Skip to content

Cloud: a new chat offers Sign in from its first turn (agent_login before the first send) - #31147

Merged
teamleaderleo merged 1 commit into
feat-cmux-nextfrom
cloud-login-new-chat
Nov 1, 2026
Merged

teamleaderleo merged 1 commit into
feat-cmux-nextfrom
cloud-login-new-chat

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #30894.

Leo, 2026-11-01, on the Cloud sign-in card: "yes those are important".

A new Cloud chat had no sign-in offer on its first failed turn. Its wire (RemoteAcpmuxWire(start:)) has no session client during initialize, so it never named agent_login. The page reads features only at initialize, so the offer stayed hidden until the chat reconnected.

The fix:

  • AgentTabs+Wiring: sets the host's servesLogin from the machine daemon's agent-session-login-v1, the same read that servesTrust and servesKeyedReason already use.
  • AgentTabRemoteHost: passes it to the start wire.
  • RemoteAcpmuxWire: names agent_login from it until a session client exists, then asks the client as before.

Test: RemoteAcpmuxLoginTests.aNewChatNamesTheFeatureBeforeItsFirstSend covers a new chat whose daemon serves the relay and one whose daemon doesn't, each with and without a Cloud owner answer.

Risk: low. An observer never takes the start route, and a wire that already has a session is unchanged.

Agent session: agent session

🤖 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

Fixes #30894. A new Cloud chat now offers Sign in from its first failed turn; previously the offer appeared only after the chat reconnected, because the start wire has no session client during initialize and so never named agent_login.

  • AgentTabs+Wiring sets the host's servesLogin from the daemon's agent-session-login-v1, the same read that servesTrust and servesKeyedReason use.
  • AgentTabRemoteHost passes that flag to the start wire, and RemoteAcpmuxWire names agent_login from it until a session client exists.
  • A wire that already has a session keeps asking its client, so existing behavior is unchanged.
  • Adds a test covering new chats with and without a serving daemon, each with and without a Cloud owner answer.

Written for commit f1020e8. Summary will update on new commits.

View guided diff Turn on auto-fix

A new chat's wire has no session client during initialize, so it never named agent_login and
its first failed turn offered no sign-in until the chat reconnected. The host now passes its
machine daemon's agent-session-login-v1 read to the start wire, which names the feature before
the first send.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

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

Review f1020e8: 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=pr31147 -f ref=cloud-login-new-chat -f platform=macos -f backend_mode=local

red: cmux-next checks (god files, concurrency, crash safety, l10n); no finished base run on 377187a to compare; do not merge until green; see lane-rules

Shipped in:

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Nov 1, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Found 7 test failures on Blacksmith runners:

Failures

Test View Logs
/tmp/tmpsod72vc6/summary-fail.json (live):/summary-fail.json (live): View Logs
/tmp/tmpuut9m969/summary-missing.json (live):/summary-missing.json (live): View Logs
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows/
[new_workspaces] debug.new_workspace timed 0 of 50 new workspace rows
View Logs
[new_workspaces] the window draws no frames/[new_workspaces] the window draws no frames View Logs
[tabs] debug.tab_switch timed 0 of 40 switches/
[tabs] debug.tab_switch timed 0 of 40 switches
View Logs
[tabs] the window draws no frames/[tabs] the window draws no frames View Logs
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)/
test_runtime_added_app_capabilities_are_runtime_only (main.StaticCapabilityRuntimeO
nlyTests.test_runtime_added_app_capabilities_are_runtime_only)
View Logs

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

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (independent Codex gpt-6.1-sol, high, via the review router; full diff from merge base 377187a to this head): SHIP at f1020e8.

No P1/P2 findings.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (subagent opus 5.5 medium): SHIP at f1020e8

No blocking findings. It checked the Swift 6 captures, both initialize branches, that no observer or read-only path can advertise the feature, and the new test.

Follow-ups:

  • [follow-up] A new chat reads the machine's daemon through daemon.supports, while an attached chat reads its own connection through identity.supports. If the two ever answered agent-session-login-v1 differently, Sign in could show on the first turn and then disappear after a reconnect.

Checks at this head: the fleet app compile passed; the webview verdict is green; RemoteAcpmuxLoginTests passed on a fleet Mac, including aNewChatNamesTheFeatureBeforeItsFirstSend.

@teamleaderleo
teamleaderleo merged commit 1b91f9e into feat-cmux-next Nov 1, 2026
233 of 253 checks passed
@teamleaderleo
teamleaderleo deleted the cloud-login-new-chat branch November 1, 2026 17:49
cmux-bot Bot pushed a commit that referenced this pull request Nov 1, 2026
…1147, #31145) (#31182)

arch-ratchet at the feat tip 2aaed54: [app_lines] CmuxNextApp +5, from #31147 (AgentTabRemoteHost.swift) on top of
#31145's +4. HandshakeFollower and its Handshake and Snapshot types hold only value logic and no app state; they move
from CmuxNextApp/Cloud/CloudMachineUpdates.swift to CmuxNextCloud/Link/HandshakeFollower.swift, and their four tests
move to CmuxNextCloudTests. No behavior change; the app calls the same API.

(cherry picked from commit 1d78bf5; prepared earlier today, fleet compile 10238882589a and suites 0a0c418e4823 green at its first base)
teamleaderleo added a commit that referenced this pull request Nov 1, 2026
)

A new chat's wire has no session client during initialize, so it never named agent_login and
its first failed turn offered no sign-in until the chat reconnected. The host now passes its
machine daemon's agent-session-login-v1 read to the start wire, which names the feature before
the first send.


Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-709509da51987320d9a5
lawrencecchen added a commit that referenced this pull request Nov 1, 2026
…o CmuxNextHostedChief (#31218)

The arch ratchet's app_lines row was +15 at the feat-cmux-next tip against the
last green arch tip 006666a (#26600 +22, #31055 +16, #22953 +15, #31147 +5,
#31106 -1, #31182 -42). CmuxNextApp may not grow.

ServerReachPlan (which paired servers the app reaches, and the parsers of
chief.list, team.hosts.list, `cmux link show` and `cmux link peer list`) holds
no app state: it is value types and pure functions over CloudChief
(CmuxNextHostedChief) and ServerReach (CmuxNextRemote). It moves as it is into
CmuxNextHostedChief with a public API; ServerReachService in the App calls it.
CmuxNextHostedChief now depends on CmuxNextRemote (service -> service).

Behavior-neutral: the only body change is parseChiefs, which read the chiefs
through the App's CloudChiefs.parseList after its guard proved `chiefs` is an
array; it now maps that array with CloudChief.parse itself, the same result.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — f1020e8d Deployed Nov 1, 2026 by teamleaderleo via cmux-tui tree preflight #96943
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