You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloud: recognize machine creators on shared teams (main) - #28788
The creator of a Cloud machine now gets vmKind: "owner" on shared teams of any size. Other members still receive team; an unread, failed, timed-out or missing member list also stays team. This changes the caller-specific attach answer, leaving teammates' access and the guest-wide kind alone.
Leo, verbatim: "yeah let's just go ahead we need to not worry that much about these and just get the initial end to end flows working and working well adn looking good and feeling good".
Generalizes #28479's one-member rule; prior art #26222 and #20076 define the separate caller and guest answers. This targets main because web/ deploys from main; companion #28789 keeps feat-cmux-next in step and updates its backend caller answer.
Risk: the caller-specific owner answer permits that creator's session to opt out of the local sandbox even when teammates can reach the machine, as authorized above. Membership errors still fail to team.
Tests cover the creator remaining owner when the team grows from one to three members, another member receiving team, a creator leaving the team, and existing error/timeout cases, through both attach transports and the pure classifier.
Observed / Not run
Observed: scoped verify-local feature flag check and diff whitespace check pass.
Linux run 41160302819 at 88ac12c22a2197596cb8d00e4e8704cd06b8aac5: restoring the old one-member condition makes bun test tests/vm-attach-vm-kind.test.ts fail on the shared-team creator cases. Restoring the head passes that same file. The combined command bun test tests/vm-attach-vm-kind.test.ts tests/vm-route-auth.test.ts passes all 119 tests; ESLint on changed logic/tests, bun run typecheck, and bun run lint:complexity pass.
Independent gpt-6-astra review at this exact head: SHIP, no findings (receipt).
Not run: live Cloud machine attach. No UI layout changes.
Changelog
Fixed: Cloud machine creators are recognized as owners on shared teams.
The VM kind classifier now returns owner for a machine’s creator when the caller appears in the owner team’s member list, regardless of team size. Attach workflow comments and tests reflect this rule.
The classifier checks whether the caller appears in the owner team’s member list. Attach comments describe creator ownership while membership remains. Tests cover multi-member and duplicate-member lists, other members, absent membership, and unreadable membership.
manaflow-ai/cmux#28479: Introduced the caller-specific lookup and attach workflow wiring that this change extends to creators on shared teams.
manaflow-ai/cmux#26222: Introduced vmKindForCaller and added vmKind to attach responses.
Suggested reviewers:lawrencecchen
Merge Risk: Minimal · up to 88ac1
The change recognizes creators who remain team members. No confirmed merge blocker remains; whether the membership SDK returns a complete list is still unverified.
Pre-merge checks: 24 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 24 passed
Check name
Status
Explanation
Title check
The title clearly identifies the main change: recognizing Cloud machine creators as owners on shared teams. The parenthetical branch name is minor noise but does not make the title unclear.
Description check
The description explains the behavior change, affected callers, unchanged behavior, risk, tests, observed checks, unverified checks, and changelog entry. It does not include explicit Proof or Checklis…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Cmux Cloud Persistent Session And Early Input
PASS. The PR changes only caller-specific vmKind classification, two comments, and tests. vmKindForCaller remains fail-closed for missing, failed, timed-out, or absent membership, and attach acces…
Cmux Swift Actor Isolation
PASS: The pull request changes only three TypeScript files under web/ and introduces no .swift files. The Swift 6 actor-isolation criteria do not apply.
Cmux Swift Blocking Runtime
PASS: The pull request changes only three TypeScript files under web/ and contains no .swift files. The Swift blocking-runtime check is not applicable.
Cmux Browser Automation Off-Main
PASS: The pull request changes only three web/ TypeScript files for Cloud VM ownership classification and tests. It does not modify cmux browser socket automation, Sources/TerminalController.swift…
Cmux Expensive Synchronous Load
The pull request changes only three TypeScript files under web/ and changes no Swift files. It therefore does not add or move any Swift synchronous agent-history load onto the main actor or an inter…
Cmux Cache Substitution Correctness
PASS: The diff does not replace an authoritative read with a cache. Attach computes vmKind per request, and callerVmKind performs a bounded listMemberIds lookup through `getTeam(...).listUsers()…
Cmux No Hacky Sleeps
PASS: The pull request changes ownership classification, comments, and tests only. It introduces no sleep, timer, polling loop, delayed dispatch, or wall-clock synchronization in production TypeScript…
Cmux Algorithmic Complexity
PASS. The production diff changes one membership check in web/services/vms/vmKind.ts:104 from a length/index test to memberIds.includes(callerUserId). This is one linear scan of the single team-me…
Cmux Swift Concurrency
The pull request changes only three web TypeScript files: route.ts, vmKind.ts, and vm-attach-vm-kind.test.ts. The authoritative diff contains no Swift files, so it does not introduce or expand a…
Cmux Swift @Concurrent
The pull request changes only three TypeScript files under web/ and introduces no Swift changes or Swift async call-site changes. The Swift @concurrent check is therefore not applicable.
Cmux Swift Package Boundaries
The pull request changes only three TypeScript files under web/ and tests. It introduces no production Swift, SwiftPM package, or AppKit code, so the Swift package-boundaries rule does not apply.
Cmux Swiftpm Lockfiles
PASS: The pull request changes only three TypeScript files under web/. It does not change SwiftPM packages, Xcode project references, .gitignore, workflows, or dependencies, so the SwiftPM lockfil…
Cmux Swift Logging
PASS: The reviewed diff changes only three TypeScript files under web/ and contains no Swift changes or added logging statements. The Swift logging rule is therefore not applicable.
Cmux User-Facing Error Privacy
The production diff changes vmKind classification and developer-only comments. It does not add or modify a user-facing error, alert, command output, recovery copy, or API error body. The changed `vm…
Cmux Full Internationalization
The diff changes VM-kind classification logic, developer comments, and tests only. The changed vmKind values (owner and team) are literal protocol/machine-marker tokens, not user-facing copy. No…
Cmux Swiftui State Layout
PASS: The pull request changes only three TypeScript files under web/. The authoritative diff contains no Swift or SwiftUI files, so the SwiftUI state-layout failure conditions do not apply.
Cmux Architecture Rethink
PASS. The pull request changes only three TypeScript files under web/; it introduces no Swift, Xcode, lifecycle, synchronization, or bridge code. The Swift architectural-rethink failure conditions a…
Cmux Swift Auxiliary Window Close Shortcuts
PASS: The pull request changes only three web TypeScript files: the attach route, VM-kind service, and tests. It adds or changes no Swift, NSWindow, NSPanel, NSWindowController, SwiftUI Window, or Win…
Cmux Source Artifacts
The PR changes only three tracked TypeScript source/test files: the attach route, vmKind service, and vmKind tests. The diff contains code, comments, and test cases for the shared-team behavior. No lo…
Cmux No Test Or Debug Seam In Production Source
The pull request changes only three TypeScript files under web/. The authoritative diff contains no Swift file under a production Sources/ path, so the no-test-or-debug-seam check does not apply.
Full details: Description check
Explanation
The description explains the behavior change, affected callers, unchanged behavior, risk, tests, observed checks, unverified checks, and changelog entry. It does not include explicit Proof or Checklist sections, but the core required information is present and the missing sections are non-critical for this change.
Full details: Cmux Cloud Persistent Session And Early Input
Explanation
PASS. The PR changes only caller-specific vmKind classification, two comments, and tests. vmKindForCaller remains fail-closed for missing, failed, timed-out, or absent membership, and attach access still runs through the unchanged requireAccessibleUserVm and billing-scope checks. The diff adds no cmux-tui client, transport, renderer readiness gate, input routing, snapshot, idempotency, revision, or lease behavior.
Full details: Cmux Browser Automation Off-Main
Explanation
PASS: The pull request changes only three web/ TypeScript files for Cloud VM ownership classification and tests. It does not modify cmux browser socket automation, Sources/TerminalController.swift, the control-command policy, WebKit/AppKit routing, or worker-lane policy tests. The browser automation check is therefore inapplicable, and no existing automation debt is worsened.
Full details: Cmux Expensive Synchronous Load
Explanation
The pull request changes only three TypeScript files under web/ and changes no Swift files. It therefore does not add or move any Swift synchronous agent-history load onto the main actor or an interactive path.
Full details: Cmux Cache Substitution Correctness
Explanation
PASS: The diff does not replace an authoritative read with a cache. Attach computes vmKind per request, and callerVmKind performs a bounded listMemberIds lookup through getTeam(...).listUsers() for creator-owned team machines. The result is returned in the attach response and is not used in a persistence, history, undo, or snapshot path. The cache-substitution failure condition is not applicable.
Full details: Cmux No Hacky Sleeps
Explanation
PASS: The pull request changes ownership classification, comments, and tests only. It introduces no sleep, timer, polling loop, delayed dispatch, or wall-clock synchronization in production TypeScript. The test timeout case is existing deterministic scaffolding and is not a new runtime delay.
Full details: Cmux Algorithmic Complexity
Explanation
PASS. The production diff changes one membership check in web/services/vms/vmKind.ts:104 from a length/index test to memberIds.includes(callerUserId). This is one linear scan of the single team-member list per attach, not a nested scan, per-target rescan, repeated sort/filter, or in-memory join. The workflow performs at most one bounded member lookup for the caller-created team machine (web/services/vms/workflows.ts:5914-5920), and the changed tests are test-only.
Full details: Cmux Swift Concurrency
Explanation
The pull request changes only three web TypeScript files: route.ts, vmKind.ts, and vm-attach-vm-kind.test.ts. The authoritative diff contains no Swift files, so it does not introduce or expand any Swift concurrency pattern.
Full details: Cmux Swiftpm Lockfiles
Explanation
PASS: The pull request changes only three TypeScript files under web/. It does not change SwiftPM packages, Xcode project references, .gitignore, workflows, or dependencies, so the SwiftPM lockfile policy does not apply.
Full details: Cmux User-Facing Error Privacy
Explanation
The production diff changes vmKind classification and developer-only comments. It does not add or modify a user-facing error, alert, command output, recovery copy, or API error body. The changed vmKind is returned in successful attach responses, not error responses, and the added tests and comments are explicitly allowed by the rule.
Full details: Cmux Full Internationalization
Explanation
The diff changes VM-kind classification logic, developer comments, and tests only. The changed vmKind values (owner and team) are literal protocol/machine-marker tokens, not user-facing copy. No Swift text, web UI text, localized API response copy, message keys, catalogs, or locale files were added or changed.
Full details: Cmux Architecture Rethink
Explanation
PASS. The pull request changes only three TypeScript files under web/; it introduces no Swift, Xcode, lifecycle, synchronization, or bridge code. The Swift architectural-rethink failure conditions are therefore not applicable.
Full details: Cmux Swift Auxiliary Window Close Shortcuts
Explanation
PASS: The pull request changes only three web TypeScript files: the attach route, VM-kind service, and tests. It adds or changes no Swift, NSWindow, NSPanel, NSWindowController, SwiftUI Window, or WindowGroup code. The auxiliary-window shortcut rule is therefore not applicable.
Full details: Cmux Source Artifacts
Explanation
The PR changes only three tracked TypeScript source/test files: the attach route, vmKind service, and vmKind tests. The diff contains code, comments, and test cases for the shared-team behavior. No logs, screenshots, recordings, caches, build output, temporary directories, dependency checkouts, or artifact-like paths were added.
Full details: Docstring Coverage
Explanation
Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 3 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
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.
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
web/services/vms/vmKind.ts-104-104: 1
104-104: Minor · Potential issue · Poor tradeoff
Unverified finding
We couldn't verify this from the code. It is shown for review, not as a verified issue.
The new any-size membership check assumes memberIds is a complete team list. The supplied production directory maps one team.listUsers() result without visible pagination; if that call returns a page, includes will misclassify a creator outside it.
An eligible creator receives vmKind: "team" and cannot use the owner-only local opt-out.
This can occur when: A team exceeds the Stack listing's possible page limit, and its creator is not on the returned page.
Reviewing files that changed from the base of the PR and between eb01dfe and 88ac12c.
Files selected for processing: 3
web/app/api/vm/[id]/attach-endpoint/route.ts
web/services/vms/vmKind.ts
web/tests/vm-attach-vm-kind.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
cmux status(one comment, edited in place; each line is updated by the job that owns it)
Merge receipt for 88ac12c22a, merged 2026-10-31 03:34:56 UTC
Not verified at merge: ci-status (not reported)
Verified: backend migrations applied, CI fast guards, Fast static checks, guards (17), merge freeze, plan, Web complexity, Web complexity candidate, Web status, Web tests (1/4), Web tests (2/4), Web tests (3/4), and 7 more
Skipped by policy: agent-session-web-resources, apply-production, apply-staging, browser, Claude request, Claude wrapper regressions, close lapsed freezes, diff-sidecar-check, Dogfood build #${{ github.event.pull_request.number }}, GhosttyKit release check, linux-preflight, macos, and 8 more
Full suite: runs on main after merge.
Labeled merged-unverified: if main breaks near this merge, look here first.
… API's owner word (#29107)
The start, folder trust and chat move-in gate refused a team VM before it
read the caller's vm_kind. Since #28788 the Cloud API answers vmKind owner
per caller for a machine's creator only, so that word now lets the creator
in on a team VM; every other caller still gets agent_session.team_vm_blocked.
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… the first prompt (DEV builds) (#29771)
* cloud.startChat passes the person's own Claude login to their machine (DEV builds)
Leo: "A TOKEN GETS PASSED". A chat started on a Cloud machine never replied:
the launcher fell back to an empty team plane ("Not logged in"), and the
personal-login transfer ran only as recovery and refused every creator-owned
team machine on its guest vm-kind.
- cloud.startChat installs the person's cached claude setup-token login (one
confirm the first time) before the chat's first prompt; Debug builds or the
cmux.cloud.passHarnessLogin opt-in only.
- CloudCredentialTransfer authorizes on the caller's attach answer
(vmKind == "owner", #28788), as the Codex broker does; the installer no
longer reads the guest's vm-kind.
- agent-auth.sh: no CodeRouter origin means own mode (no-team-plane).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
* cloud.startChat: await the login in run(), before open
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
* cloud.startChat: a chat with no project gets the harness login too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
* credential transfer: an owner guest stays required; the creator allowance is the DEV first chat's only
Review (gpt-6.1-sol, BLOCK at 1c5016b): teammates on a team machine run as the
same Unix user, so the production recovery path keeps requiring an owner guest.
Only cloud.startChat's DEV/opt-in login passes creatorTeamMachine. The account
is checked again after the login's wait.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
* credential transfer: no creator allowance here; an owner guest stays required
Two reviews (gpt-6.1-sol at 1c5016b, gpt-6-astra at 1e2624f) block a personal
token on a team guest, where teammates share the Unix user. That allowance moves
to its own held PR for Leo's security call.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
* agent-auth: own mode drops a stale model-plane pair with no CodeRouter origin
A machine that persisted only the OpenAI pair has a CodeRouter URL and no
CMUX_CODEROUTER_URL. In no-team-plane own mode, a base URL paired with the
placeholder key is the model plane's and is dropped, so an own login never
reaches that endpoint. A user's own endpoint with their own key stays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
* devbox: agent-auth.sh awaits its rebake (desktop 54913b41153e)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
* cloud.startChat: skip the login on a team guest before any confirm
The transfer's preflight refuses a guest whose /etc/cmux/vm-kind is not
owner (teammates share its Unix user), so a creator's team machine could
only end in that refusal after the first-login confirm. Probe the guest's
kind first and skip there; team machines are cmux#29774.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
* cloud.startChat: only the person answers the first-login confirm
Automation (debug.dialog) may dismiss it, never press Set Up: the confirm
caches and installs a year-long Claude login, as the other credential
dialogs already guard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…or policy
Review at 99e6f0f (BLOCK, two P1s):
- The typed token check pinned bound.grant, but team SSH bindings carry no
grant, so CA/account sync could never authenticate. A grantless binding now
pins user, install and team; the bounded original-authority path still
requires and pins a grant.
- Native role/dispatch/terminal tests expected a signed owner to be refused on
a team VM, contradicting NEXT's creator policy (#28788). A signed owner is the
creator and is admitted there; signed team and missing roles stay refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merged-unverifiedA judging check was not green at merge; see the merge receipt comment
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The creator of a Cloud machine now gets
vmKind: "owner"on shared teams of any size. Other members still receiveteam; an unread, failed, timed-out or missing member list also staysteam. This changes the caller-specific attach answer, leaving teammates' access and the guest-wide kind alone.Leo, verbatim: "yeah let's just go ahead we need to not worry that much about these and just get the initial end to end flows working and working well adn looking good and feeling good".
Generalizes #28479's one-member rule; prior art #26222 and #20076 define the separate caller and guest answers. This targets
mainbecauseweb/deploys frommain; companion #28789 keepsfeat-cmux-nextin step and updates its backend caller answer.Risk: the caller-specific owner answer permits that creator's session to opt out of the local sandbox even when teammates can reach the machine, as authorized above. Membership errors still fail to
team.Tests cover the creator remaining owner when the team grows from one to three members, another member receiving team, a creator leaving the team, and existing error/timeout cases, through both attach transports and the pure classifier.
Observed / Not run
88ac12c22a2197596cb8d00e4e8704cd06b8aac5: restoring the old one-member condition makesbun test tests/vm-attach-vm-kind.test.tsfail on the shared-team creator cases. Restoring the head passes that same file. The combined commandbun test tests/vm-attach-vm-kind.test.ts tests/vm-route-auth.test.tspasses all 119 tests; ESLint on changed logic/tests,bun run typecheck, andbun run lint:complexitypass.Changelog
Fixed: Cloud machine creators are recognized as owners on shared teams.
Agent session: agent session