Skip to content

Refuse --reauth without an account instead of adding one - #14100

Merged
omarchybot merged 1 commit into
omacom:quattrofrom
manuaudio:fix/account-reauth-needs-account
Oct 31, 2026
Merged

omarchybot merged 1 commit into
omacom:quattrofrom
manuaudio:fix/account-reauth-needs-account

Conversation

@manuaudio

Copy link
Copy Markdown
Contributor

omarchy-agent-account-add --reauth <account> signs an existing account in again. Called with no account, reauth ends up empty and the script falls through to the normal add flow. It opens a sign-in, registers whoever logs in as a new account, and reports Added … with exit 0. Someone who meant to fix a lapsed sign-in ends up with an extra account. The same happens with --reauth --events, where --events is taken as the account name.

--reauth now requires a following argument that isn't another flag. Without one, it prints its usage and exits 1 before anything starts.

Testing

agent-account-test.sh runs --reauth and --reauth --events with no account. Each must fail, add no account, and open no sign-in. That check fails on quattro (the first case adds an account) and passes with this change; all 29 checks pass, including the existing --reauth <account> cases. shellcheck -S warning is clean.

🤖 Generated with Claude Code

@greptile-apps

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium risk] Changes how the account-add command validates the reauth flag.

This PR appears safe to merge; invalid reauthentication calls stop before sign-in, while valid calls remain unchanged.

What we checked:

  • Valid accounts still work: unique_id builds account IDs from slug, which removes leading hyphens. The special value :primary also passes the guard.

Summary

omarchy-agent-account-add now refuses --reauth when its account argument is empty or starts with --.

  • Prints usage and exits before starting sign-in or changing accounts.
  • Adds regression checks for --reauth and --reauth --events.
  • Leaves valid account reauthentication unchanged.

Review checks were based on source inspection; tests were not run.

Reviews (1) · Last reviewed commit: "Refuse --reauth without an account inste..."

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything seems fine, ready to merge.

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 15, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 5cbb407, with nothing to change.

The bug is real on current quattro (246f33a): omarchy-agent-account-add --reauth with no account, or with an empty one (--reauth "" claude), skips the reauth path and runs the add flow. It opens a private sign-in, registers a new account and exits 0. On a worker built from the Omarchy ISO, a reproduction of my own added a third Claude account on quattro and on this branch with the fix reverted. It refused, with no account added and no browser opened, on this head and on this head merged into current quattro. test/shell.d/agent-account-test.sh passes 29 of 29 on both. ./test/cli is green on the merge. On this head alone one unrelated vscode theme test fails, and it fails the same way at its fork point 0537ae1; quattro has fixed it since.

One correction to the description: on quattro, --reauth --events does not add an account. --events is taken as the account id, and the existing lookup fails with "No Claude account named --events". The --* half of the guard therefore turns a confusing error into the usage line rather than fixing a second bug. That's still worth having. For the same reason, the test's --reauth --events case passes with or without the guard, so the bare --reauth case is the one carrying the regression check.

Account ids can't trip the guard. slug in omarchy-agent-account-state strips leading hyphens and unique_id never returns an empty id, and the agents panel always passes an id or :primary.

The second opinion was Codex at medium effort. It reached the same conclusion, though its independence isn't guaranteed, and it raised the --reauth --events correction above, which I then confirmed on the worker. This is now waiting on the maintainer.

@manuaudio

Copy link
Copy Markdown
Contributor Author

Thanks @chessing234 — I appreciate the review. The --reauth refusal case is still covered on the current clean head, and the checks pass.

@omarchybot
omarchybot merged commit a3c3a6a into omacom:quattro Oct 31, 2026
1 check passed
@emirb emirb added this to the 4.5 milestone Nov 5, 2026
berenddeboer pushed a commit to berenddeboer/omarchy that referenced this pull request Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants