Add a second Claude account
You can add a second Claude account only on the Managed accounts sign-in method, in Settings → Accounts → Claude → Add Account. That card signs you in to Claude.ai over OAuth, or takes an sk-ant- API key. This page also covers cancelling a sign-in in progress, activating an account, and what the Settings page and the OAuth flow do under the hood.
On this page
What it is
An account in Omniscio is a credential Omniscio uses to talk to Anthropic's API — either a Claude.ai subscription (login via OAuth) or a raw sk-ant-... API key. Sessions need an account to spawn the Claude CLI; AI features (titles, suggestions, spam filtering, automations) also need one. Omniscio supports holding more than one account at the same time and silently picks the freshest one per spawn (see account-pool.md).
Start here: a second Claude account needs the Managed accounts sign-in method. The account list and the Add Account card exist only under that method — see auth-pathways.md for how to pick it. On the other methods there is no list to add to: Claude Code login and Your API key keep the credential outside the account list entirely, and Sign in to Claude signs in one Claude account and refuses a second with "You're already signed in to a Claude account here." API keys are capped at one everywhere, so a second key replaces the first in place rather than stacking beside it (see step 5). Managed accounts only appears when it is available to you, so if you do not see it you cannot hold a second in-app account.
Then, to add it, open Settings → Accounts (under the AI & Accounts group in the Settings sidebar) and go to the Claude tab. The account list sits just below the sign-in method picker; the Add Account card is further down the same tab, near its bottom — past the API key list, the session toggles and the Other AI tools list. On that card, click Log In with Anthropic and sign into Claude.ai, or click Or add an API key manually and paste a key. The account lands in the Login Accounts or API Keys list. Your first account is usually added during onboarding instead, which runs the same card for you.
There are two kinds of accounts. Login accounts sign in through the same PKCE OAuth flow as the Claude Code CLI — your Claude.ai subscription powers sessions, and Omniscio tracks 5-hour and 7-day usage caps per account. API key accounts use a raw key from the Anthropic Console; they pay per-token instead of consuming a subscription quota, and by default they are restricted to AI features only (the toggle that lets them spawn sessions is off out of the box).
Where to find it
How to use it
Open Settings → Accounts. Click the gear icon in the toolbar (or open the Settings virtual project from the Omniscio sidebar group), then open the AI & Accounts group and click Accounts (User icon); Claude is the first tab. The page lists every account you've already added under Login Accounts and API Keys, with the Add Account card near the bottom of the tab — below the API key list, the session toggles and the Other AI tools list. Both are visible only on the Managed accounts sign-in method (auth-pathways.md).
Sign in with Claude (OAuth — primary path). In the Add Account card, click the prominent Log In with Anthropic button (LogIn icon, accent color). Omniscio opens your default browser to the Anthropic authorization page, you sign into Claude.ai, and you click Authorize on the consent screen. Omniscio's local callback server captures the authorization code, exchanges it for a refresh token, fetches your profile (email, display name, plan tier), and saves the account row. Total time is usually 10–20 seconds; the Add Account card shows a "Logging in..." state and a "try again" link below it that reopens the browser if the page didn't load. The login times out after 15 minutes.
- On success, a toast confirms
Logged in as <email>(orLogged in as <email>. Now activeif Omniscio switched the active account to the new one). The account lands in the Login Accounts list with a green dot if it's now the active account. - Nothing opened where you can see it? Copy the link. While a sign-in is in progress the card shows the exact sign-in link Omniscio is waiting on, under "Sign-in didn't open automatically? Copy this link and open it in your browser on this computer:", with a Copy link button. Open that link in any browser on this computer and the same sign-in finishes — the link is tied to a local callback on this machine, so opening it on a phone or another computer cannot complete it. This is the way out when the browser hand-off landed somewhere invisible (a background browser answering your default-browser clicks); "try again" would simply hand the link to the same place.
- Changed your mind? Cancel it. Next to "try again" is a cancel sign-in link (and a cancel action in the toolbar account popover's footer). Closing the browser tab does not tell Omniscio anything on its own — so without cancelling, Omniscio keeps believing a sign-in is in progress for the full 15 minutes, and during that time the Log In with Anthropic button stays disabled on "Logging in..." and a fresh attempt is refused with "A login is already in progress". Cancelling releases it immediately so you can start again or sign in as a different account. Cancelling saves nothing — an account row is only ever written after a successful sign-in.
- A sign-in that doesn't finish leaves no account behind. If a sign-in got far enough to receive tokens but Omniscio couldn't confirm which Claude account they belong to (a rate limit or a network blip at the wrong moment), the row is added unnamed and Omniscio keeps trying to identify it in the background. While that is happening the row reads "Finishing sign-in…"; if it can never be identified it reads "Sign-in didn't finish" with a plain-language note, offers no Switch (there is no account to switch to), and is cleaned up automatically. Historically these rows showed as
unknown@claude.aicomplete with a plan badge, looked like a second real account, and stayed forever — the auth-login-contract holds the invariant that stops it. - The OAuth scopes requested are
org:create_api_key,user:profile,user:inference,user:sessions:claude_code,user:mcp_servers, anduser:file_upload. The scopes match what the official Claude Code CLI requests so your Claude.ai subscription works the same way it does inclaudeon the terminal. - Re-authorizing an existing account targets the right identity automatically. When you click "Log In" on a specific account row, Omniscio passes that account's email as
login_hintin the OAuth URL so Anthropic's consent screen pre-selects the correct account — you don't need to manually switch accounts in your browser first. The existing account row's tokens are updated in place instead of creating a duplicate. If you sign in to a different Claude.ai account in the browser (overriding the hint), Omniscio creates a new row and (if it was your only account before) flips it to active.
- On success, a toast confirms
Or add an API key. Below the Log In button, click the small Or add an API key manually link (Key icon). A password-style input appears — paste your
sk-ant-...key from https://console.anthropic.com and click Add API Key. Omniscio saves the encrypted key to disk — it does not pre-validate the key, so use Check Limits on the row afterwards to confirm it works. A toast confirmsAPI key added. If the key is invalid you'll see aCould not add account: <reason>error and the input stays open.- The first API key shows a separate prominent card at the top of the API Keys section labeled Anthropic API Key with a three-state badge: green Configured (a saved key Omniscio can actually read), amber Can't be read — re-enter (the key record exists but its encrypted-at-rest copy no longer decrypts — typically after a hardware/Windows change resets DPAPI; the key itself is still fine), or grey Not configured (no key at all). The card's inline paste form appears whenever the badge is not green — so an unreadable key can no longer hide the only way to re-enter (that was the bug). Re-pasting the same key while it's amber repairs it in place (no duplicate row) and the badge returns to green. Use either entry point; both call the same handler. You're also notified proactively: if a saved key can't be read, Omniscio raises a persistent Inbox alert at startup — independent of other features, so it shows even with the waiting double-check turned off — pointing you to re-enter the key; re-entering clears it. Full semantics: apikey-badge-decrypt-health-contract.md.
- API key accounts cannot take over from a login account by default. The setting Allow API Keys to Run Sessions lives just below the API key list and is off by default. While off, a session uses a login account when you have one, and falls back to the all-exhausted banner if none has capacity — the API key is used for sessions only when it is your ONLY Anthropic account. Flip the toggle on to let sessions run on the API key even when a login account exists (you'll be billed per token by Anthropic). See account-pool.md for how the pool tier-list interacts with this setting.
- Replace a key in place. Each row in the API Keys list has a Replace link (alongside Activate and the trash icon). Click it to open a paste box right on that row, paste a new
sk-ant-...key, and click Replace key — the key is swapped on the same account in place (its name, cost history, and active status are kept), so you never have to add a second key and delete the old one, and the last-account removal guard never gets in the way. The swap is immediate and not pre-validated, so use Check Limits afterwards to confirm the new key works; a "Replaces your current key immediately" note sits under the box, and if the save fails the box stays open showing the error (it never falsely reports success). Replace shows only on a healthy key — an unreadable (amber) key keeps the re-enter it above flow on the prominent card instead. Mechanics: apikey-badge-decrypt-health-contract.md (B9). - When Anthropic turns your key down in the middle of a session. A session running on your own API key that Anthropic refuses (the key is wrong, was revoked, or its account has lost access) ends at once with one message — Anthropic turned down the API key this session runs on, so your message could not be answered — and an Open API key settings button that jumps to the Anthropic API Key card in this section. Omniscio stops there instead of retrying, because every retry would send the same key. Use Replace on the key's row (or paste a new one on the card), then send your message again: the session starts a fresh Claude Code process that carries the new key. Omniscio stops the refused process straight away, so anything the session was still running in the background ends with it and the session says so. Until you send, the session's status reads Auth Error. A session on a login account or on Omniscio's managed credits has its own recovery and never shows this message. Contract: account-refused-placeholder-recovery-contract.md.
(Optional) Pick which account is active. After adding an account, the row in the Login Accounts or API Keys list shows an Activate link if it isn't already the active one. Clicking Activate flips the active-account flag, which the account pool uses as the preferred account for the next spawn. There's no separate "Pin" affordance — Activate is the pin. Nothing about your existing sessions or projects is automatically reassigned to the new account; pinning is purely about who powers the next spawn.
How many accounts you can hold depends on the pathway — it is not unlimited. Only the owner-gated managed pathway (the owner's own install, or one already running a pooled setup) has no cap on login accounts and silently rotates through them by usage headroom (see account-pool.md). Every other install is capped:
- "Sign in to Claude" is capped at exactly one account. A second attempt is refused with "You're already signed in to a Claude account here. Sign out of it first if you want to use a different one — this sign-in method uses a single account." (
OWN_LOGIN_MAX_ACCOUNTS = 1in session-auth-mode.ts, enforced at both sign-in entry points). The cap is the feature: pooling behaviour is emergent from holding more than one account, so a public install cannot accidentally become a pool. - "Claude Code login" and "Your API key" do not accept Anthropic login accounts at all. They use the Claude account you already have through Claude Code, or your own Anthropic API key. So "keep two Claude.ai subscriptions to double your daily session capacity" is only a managed-install pattern, not something a public install can do.
- An install that has run the pool keeps the option, even if the account list is lost. Omniscio records the first time an install really holds pooled accounts, and that record is what makes Managed accounts available — not the rows alone. A reinstall, a wiped account list or a removed account therefore no longer hides the method. The record has no Settings control: it can never be granted from the settings surface, and an install that has never run the pool still does not see the method.
- API keys are capped everywhere: Omniscio keeps exactly one. Adding an API key when one already exists replaces it in place instead of stacking a second, and a pile left over from before is collapsed to the one already in use the next time Omniscio starts — multiple keys serve no purpose (only one is ever used) and would otherwise let different AI features bill to different keys. Full rules: single-anthropic-apikey-contract.md.
- "Sign in to Claude" is capped at exactly one account. A second attempt is refused with "You're already signed in to a Claude account here. Sign out of it first if you want to use a different one — this sign-in method uses a single account." (
If the sign-in is rate-limited (Cloudflare)
Anthropic's token endpoint sits behind Cloudflare, and it rate-limits. When that happens the browser part of the sign-in has already succeeded — you authorized the app, and only the final step (swapping the authorization code for tokens) was refused. Omniscio says so directly:
Login rate-limited by Cloudflare. The token endpoint is temporarily blocked. Please wait 15–30 minutes and try again. Your browser authorization was successful — only the token exchange is blocked.
What to do, and what not to:
- Wait 15–30 minutes, then sign in once more. The block is temporary; there is no action inside the app that clears it early, and hammering Log In with Anthropic only spends the same rate-limit budget again.
- Nothing was half-saved. An account row is written only after a successful token exchange, so a rate-limited attempt leaves no ghost account and never needs cleaning up.
- On your very first account there is a fallback. With no account yet, Omniscio imports the credentials the Claude Code CLI already stored on this machine, and you are signed in without seeing the error at all. That fallback is deliberately skipped when you already have an account — you might be adding a different Claude.ai account, and importing the CLI's would silently give you the wrong one.
- Adding a second account is therefore the case you will see this in. Wait it out, or add an API key in the meantime (step 3) — the key path does not touch the OAuth token endpoint (remembering that API keys cannot spawn sessions unless Allow API Keys to Run Sessions is on).
A separate message — "Sign-in failed — Anthropic could not verify the login. Please try again; if it keeps failing, check status.anthropic.com." — is not a rate limit. It means the token exchange failed for another reason (often a real Anthropic outage), so check the provider's status page before retrying in a loop.
The catch-all is "Sign-in failed. Please try signing in again in a moment."
(account-error.ts, GENERIC_LOGIN_FAILURE). It is
what the app says when a sign-in failed for a cause it could not name — an expired OAuth client, a
403 from the token endpoint, a clock skew, a proxy or antivirus interstitial, or an unrecognised
provider error. The distinction from the sentence above matters: that one means "Anthropic told us
the exchange could not be verified" and points at the status page, while this one means "the app did
not get a reason it could trust", so the status page usually has nothing on it. The next step is to
try once more (the first attempt may have hit a transient hand-off fault), and if it keeps
happening, restart Omniscio and sign in again before filing a bug report — the raw cause is in
main.log beside the sign-in attempt.
How it behaves
How it works
The page is AccountSettings.tsx, which reads from the account-store.ts Zustand slice (the same store that powers the toolbar's AccountIndicator). The OAuth flow is implemented entirely in auth-service.ts — authService.login() is the single public entry point. It generates a PKCE code verifier + challenge, starts a local callback server on localhost:<random-port>, opens the Anthropic authorize URL via shell.openExternal(), waits for the redirect to /callback, and POSTs the authorization code to https://platform.claude.com/v1/oauth/token with Content-Type: application/json and a JSON.stringify'd body. The bind host is deliberately localhost and not 127.0.0.1 — Windows 11 resolves localhost to ::1, so binding the literal IPv4 address can miss the browser's callback (oauth-callback-server-core.ts). The token endpoint format is non-negotiable — see CLAUDE.md "Token endpoint format" rule. The exchange does not retry: it runs with maxRetries: 0, because retrying the token endpoint is forbidden by the auth-login-contract (exchange-must-succeed-on-first-try). The whole sign-in holds that endpoint, not just its HTTP round-trip: auth-login-flow.ts claims it on the gateway when the flow starts and releases it in its finally, and while it is held a background refresh is refused before it reaches the network — so it can neither spend the exchange's rate-limit budget nor arm the 429 backoff the exchange would then have to read. A background caller's 429 observed during that window does not arm that backoff either (auth-login-contract, login-exchange-gets-absolute-priority). Instead, when the exchange is rate-limited, a first-time login (no existing accounts) falls back to importing the Claude Code CLI's stored credentials. After the token exchange, fetchProfile() calls /api/oauth/profile to get the email, display name, and rate_limit_tier, and saveAccount() writes the account row into config.json. Renderer-side, the Log In with Anthropic button calls addLoginAccount() on the account store, which invokes IPC.ACCOUNT_ADD_LOGIN; the handler in claude-provider.ts parses an optional { loginHint } payload (validated by addLoginAccountSchema) and calls authService.login(loginHint). When re-authenticating an existing account row, the renderer passes account.email as the hint; when adding a brand new account (the "+ Log In" button), no hint is sent. authService.login() appends login_hint=<email> to the OAuth authorization URL when a hint is provided, so Anthropic's consent screen pre-selects the correct account. The handler returns { account, accountSwitched } so the toast can say "now active" when appropriate.
Identity resolution is the fragile step, and it is now bounded-retried rather than one-shot: resolveProfileWithRetry (profile-resolve-policy.ts) makes up to 3 profile attempts (~1.6s worst-case extra wait) before falling back to the unknown@claude.ai sentinel. That retry is safe because the profile API lives on api.anthropic.com, a different domain with independent rate limits from the token endpoint — it is deliberately not a retry of the token exchange, which the auth contract forbids. Any row that still lands on the sentinel is healed in the background by reresolveStaleAccountProfiles(); a row that can never be healed (its refresh token was quarantined, so the heal's ensureTokenValid gate can never pass) is removed by reapLoginAccountResidue (auth-account-residue-reaper.ts) at the end of that same pass. The reaper is deliberately conservative — a row must have an unresolved identity and provably dead credentials and be past a 10-minute grace window — and both it and the row's UI label read the same shared classifier (login-account-residue.ts), so what the list says can never disagree with what gets swept. Cancelling an in-flight login goes through IPC.ACCOUNT_CANCEL_LOGIN → authService.cancelLogin(), which rejects the pending login() so its existing finally releases the in-progress lock and closes the loopback callback server. The copyable sign-in link is IPC.ACCOUNT_PENDING_LOGIN_URL → authService.getPendingLoginUrl(), a read-only, desktop-only channel that answers the in-flight pendingAuthUrl only while the login lane is live and null otherwise (it is blocked on the mobile/web bridge beside reopen and cancel, and it carries the PKCE challenge and state — never the verifier or a token).
API key adds go through IPC.ACCOUNT_ADD_APIKEY validated against addApiKeyAccountSchema (only apiKey is required; name and email default to 'API Key' and ''). authService.addApiKey() enforces the single-key model: with no api-key account it creates one (new UUID) and auto-activates if there's no active account yet; with one already present it writes the key into the canonical slot (the active apikey, else the oldest) in place via replaceApiKey and removes any other api-key rows, so a second never accumulates. A one-time collapseApiKeyAccounts pass inside migrateAccountSystem (at config load, after decryption) likewise collapses any pre-existing pile to that single usable/in-use key — removing empty-junk rows and extras, but never the last re-enterable key (so a key that's only temporarily unreadable after a DPAPI reset still has a slot to repair). Full rules + tests: single-anthropic-apikey-contract.md. When a saved key can no longer be decrypted (see the badge note above), the schema also accepts an optional replaceAccountId so re-entry routes to authService.replaceApiKey() — an in-place saveAccount on the existing id that repairs the resolved (active-apikey-else-first) account instead of minting a duplicate, and clears the replacement flag. Targeting the resolved account matters: the AI features read the active apikey first (resolveApiKeyCredential), so adding a new inactive key would leave the badge green while the double-check still reads the dead one — see apikey-badge-decrypt-health-contract.md (B7). Separately, each api-key row exposes a Replace action (handleReplaceApiKey) that sends ACCOUNT_ADD_APIKEY with the explicit clicked-row id as replaceAccountId — the same in-place replaceApiKey swap, but it never runs the resolveApiKeyReplaceTarget fallback, so it carries none of that insertion-order coupling (B9). Both account types are stored in the same accounts[] array in config.json (a discriminated union on type: 'login' | 'apikey'), with credentials encrypted via Electron's safeStorage.encryptString() and tagged with the enc: prefix per the security rule "Credential encryption" in CLAUDE.md. Tokens never reach the renderer — the renderer only sees AccountSummary objects with credential fields stripped. At session spawn time, the process manager reads authService.getCredentials(accountId) and injects either CLAUDE_CODE_OAUTH_TOKEN (login) or ANTHROPIC_API_KEY (api key) into the spawned CLI's environment. The allowApiKeySessionSpawn toggle is enforced in three layers: filterAccountsForSpawn() in pickActiveAccount(), shouldBlockApiKeySpawn() in spawnLocalStreamJson(), and filterSpawnEligibleAccounts() in tryAutoSwitch() (see account-management.md "API Key Session Guard").
Related
- account-pool.md — once you have multiple accounts, the pool tier-list decides which one each session uses
- switch-active-account.md — there's no "switch active account" button per se; this page explains why and how Activate interacts with the pool
- remove-a-claude-account.md — taking an account back out, including the only-account case
- usage-forecast.md — the inline forecast row each login account row shows, predicting when its 5-hour bucket exhausts
Last verified 2026-10-27