cmux-cloud-start-core: who may answer a Cloud start ask, and the harness login choice, over the app FFI (step A)
Step A (Rust only, no Swift change) for #32734 and the --login follow-up: the rules land here, the app FFI re-pins, then the Swift side calls them.
Leo: "we need to improve the docs/instructions/commands and guidance and whatnot to make this all smoother faster more efficient more exposed / cuz chief will be using this kind of flow", and on the login prompt: "wait so for this situation are there better boundaries to have the login situation? didn't we have like the daemon or whatever on your machine is able to have the token on your machine that lets you do stuff there?"
cmux-cloud-start-core::ask (new; op cloud_ask_answer, cloud_ask_first)
- Who answers a Cloud start ask from
cmux agents dialog answer: Not now is anyone's. Start is the person's (a CLI request naming no agent session), or an agent's only when the person delegated it (cloud.agentsStartWithoutAsking, a person-only setting, default off). cloud_ask_first: an agent's start shows the card unless the person delegated it.
harness_login: the login choice (op cloud_harness_login, new optional inputs, so today's app is unchanged)
requested(--login pass|machine|none),requested_by_person,stored(the person's earlier choice, kept per user),headless.- Order: a machine login that works is kept and nothing is asked;
nonepasses nothing;machinewith no machine login refuses (machine-login-missing); a cached login installs; the person's ownpassinstalls (it is their confirm); a headless run with none of these refuses at once (needs-login-choice) instead of waiting on a confirm nobody sees; otherwise the palette's one confirm. - An agent's
--login passis never consent.
CLI: cmux agents dialog answer (and its MCP tool) sends origin (cli or mcp) and, from an agent's shell, its caller, so the app tells the person's terminal from an agent.
Consent rule kept: an agent never approves a permission the person must give. It can decline, and it can choose Start only once the person has delegated that.
Tests: ask/tests.rs (7), harness_login/tests.rs (+4), FFI ask_cases.rs (5), cli/agents/tests.rs, the MCP tests. Run on the fleet: cmux-cloud-start-core, cmux-layout-reducer-ffi, cmux-tui (agents/dialog/mcp), clippy -D warnings, rustfmt.
Agent session: agent session
🤖 Generated with Claude Code
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Step A of the Cloud start ask work: lands the Rust rules for who may answer an ask, and for the harness login choice, over the app FFI. No Swift changes yet; the app re-pins and the Swift side calls these next.
- Anyone may answer "Not now"; "Start" is the person's own, or an agent's only when the person delegated it (
cloud.agentsStartWithoutAsking, person-only, default off). harness_loginhonors--login pass|machine|none, falling back to the person's stored choice;nonedecides before the owner or guest is read;passis consent only when the person's own or the one they kept, an agent's freshpassnever is; headless runs with no login and no choice refuse at once rather than wait on a confirm nobody sees.cmux agents dialog answer(and its MCP tool) now sendoriginand the caller so the app can tell the person's terminal from an agent's.