Repository navigation
Agent: add maple-agent logout and refuse login while signed in - #1620
Merged
Merged
Conversation
The shared host only signs in from a signed-out state, but `maple-agent login` still claimed it would replace a saved sign-in, then failed after the password prompt. There was no command-line way to sign out, so a headless host could not sign in again (for example after a password change). `login` now stops before prompting and points to `maple-agent logout`. `logout` runs the desktop's Sign out sequence through the host (`stop_runtime`, then `logout_and_clear`). Account-scoped data and remote pairings stay for the next sign-in to the same account. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AnthonyRonning
approved these changes
Nov 16, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
maple-agent loginsaid "signing in again replaces it", read the email and password, and then failed with "Maple is already signed in. Sign out before changing accounts." There was no command-line way to sign out, so a headless remote host could not sign in again, for example after a password change.The refusal is intentional. Since #1161 the shared host only signs in from a signed-out state, so an account change always goes through an explicit sign-out that revokes ACP connections and old account handles. The CLI message predates that change; the #1161 review flagged it and it was never fixed. This PR keeps the host rule:
maple-agent loginchecks for a saved sign-in before prompting and stops with: "Maple is already signed in. Runmaple-agent logoutfirst, then sign in again."maple-agent logoutcalls the host'slogout_and_clear, the same operation behind the desktop's Sign out. It drains the account's runtime, reports the sign-out and removes the saved session. With no saved sign-in it says so and exits 0. Like login, it needs an unlocked store.Sign-out shuts down remote access, and it comes back when the same account signs in again if it was enabled (
host.rs, the account-change handling after each request). Pairings, tasks and settings are account-scoped and are not removed. The README documents both commands. No host, protocol or store changes.Testing
25421914and9a7d870f:ci-lint(fmt, clippy for every feature set) andci-test(all workspace tests) passed. One earlier hook run on9a7d870ffailedui::chat::tests::state_tests::test_removing_project_cancels_catalog_wait_and_opens_empty_fallback, a timed UI wait unrelated to this change; it passed 8/8 alone and in the rerun.logouttakes no arguments.logout, orloginwhile signed in, against a live host with a real or Local fixture account.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.