Sources
- Move running Claude sessions along when switching accounts
- Merge pull request #19268 from omacom/agent-account-follow
- review-comment by greptile-apps[bot]
- review-comment by greptile-apps[bot]
- review-comment by
omarchybot
- review-comment by
omarchybot
- Save a settled seat before its copy goes, and copy to older backends
- issue-comment by
omarchybot
- Read each Claude login under the lock that moves it
dhh merged omacom/omarchy#19268 into quattro at 13:29 UTC;
omarchybot also took part in the PR. Until now, switching the active Claude account only changed where new sessions started. Sessions that were already running stayed on the account that had just run out. Now every Claude session runs from ~/.claude, which holds the login of the selected account. omarchy agent account use, autoswitch and adding an account swap the chosen login into ~/.claude while holding Claude Code's own lock files. According to the PR description, running sessions then pick up the new account from their next message.
A refresh token works only once, so a login is kept in exactly one place. A move is refused while a session launched by an older Omarchy still holds the target account's token. Codex sessions can't follow a switch this way and are unchanged. A side effect noted in the PR: claude mcp add now reaches every account.
Greptile raised two P1 findings. An interrupted move could lose track of whose token ~/.claude held (omacom/omarchy#19268:discussion_r4611925339), and copying accounts to machines with an older backend would fail (omacom/omarchy#19268:discussion_r4611925358). omarchybot replied that both were fixed in commit omacom/omarchy@e59606d37ded (omacom/omarchy#19268:discussion_r4612094408, omacom/omarchy#19268:discussion_r4612094742). A further finding about the usage collector reading the wrong account during a switch was fixed in omacom/omarchy@4beb2a159a35. That commit makes the collector hold the registry lock while it reads logins (omacom/omarchy#19268:issuecomment-6979162052).
