Skip to content

Match source account names when copying over SSH - #15430

Merged
dhh merged 1 commit into
quattrofrom
fix/agent-account-copy-receiver
Oct 14, 2026
Merged

dhh merged 1 commit into
quattrofrom
fix/agent-account-copy-receiver

Conversation

@dhh

@dhh dhh commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Copying subscriptions to an older Omarchy machine failed when its receiver was not installed. Existing destination account names were also retained, so the source's Main could become Main 2 or refer to a different account on the destination.

Copy now synchronizes account names and command IDs with the source, including accounts already present, while keeping credentials, home paths, switching preferences, and the selected identity. Batch renaming handles swaps; unrelated destination accounts are renamed only when their names or IDs conflict. Existing credentials are replaced only with --replace.

Supply a temporary receiver over SSH stdin when needed. The remote shell skips user profiles and BASH_ENV, loads only Omarchy's system environment bootstrap, and runs /usr/bin/python3 -I. Compatible installed receivers take precedence. When an installed receiver lacks name synchronization, use the destination's own backend with the bundled receiver to preserve newer registry fields. No receiver code is installed, and credentials stay out of command arguments.

Validated with fixture transfer tests, actual shell and Python isolation, malformed and oversized input, installed receiver preference, newer destination registry preservation, name swaps and collisions, and CLI checks. Verified a real transfer to an older Omarchy machine and synchronized all three Claude names and IDs without replacing its existing credentials.

Claude reviewed the implementation; its source-ID collision finding is fixed and covered by default-name and numeric-suffix regressions. The fallback backend API matches the release that introduced account copy. Account, recovery, transfer, and CLI regression checks pass.

@dhh
dhh merged commit 8dae158 into quattro Oct 14, 2026
@dhh
dhh deleted the fix/agent-account-copy-receiver branch October 14, 2026 05:03
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants