Accounts and Auto
Register isolated agent accounts and use Auto selection, pinned profiles, live task switching, and usage-limit recovery safely.
AGI Cockpit account profiles isolate multiple sign-ins for the same agent provider and let tasks, Autoruns, and Fleet runs choose between them. Profiles are supported for Claude, Codex, Antigravity, Cursor, Qoder, and Grok Build.
Muse Code uses one shared login per computer (Keychain on macOS) or a Meta API key saved under Settings → Agents → Muse Code. It has no named profiles, Auto, or account switching. Changing configuration folders does not isolate its logins. See Agents and models for authentication and the freshness limits of its reported usage.
Understand default and named profiles
Each provider has a default account that uses its existing environment. Cockpit respects CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME, CURSOR_CONFIG_DIR (or CURSOR_DATA_DIR), and QODER_CONFIG_DIR inherited at launch for the corresponding default account. Authentication checks, usage reads, and execution use that location. Named profiles keep their own isolated directories. You can add named profiles such as work and personal. A profile name is Cockpit's local selection label, not the AI service's plan name or email address.
An agent account profile is separate from a Browser Identity. An account profile isolates execution authentication for Claude, Codex, or another task agent. A Browser Identity isolates cookies, localStorage, and other website state in the in-app browser.
Create and sign in to a profile
Open the target agent under Settings → Agents, add an account profile, and sign in to it. From the CLI, identify the provider with --agent-type.
cockpit accounts
cockpit accounts create work --agent-type codex
cockpit accounts login work --agent-type codex
cockpit accounts list --agent-type codex
Choose authentication for a Claude profile
Under Settings → Agents → Claude Code, each named profile has an Authentication selector. Choose Claude Code login to use that profile's subscription sign-in, or Anthropic API key to save a key just for that profile. Changes apply when a task next starts or resumes; an active session keeps its current authentication.
A profile with no explicit method inherits the shared Claude authentication setting. If the shared method is API key, that inherited choice runs Native UI tasks as the default account with the shared key. To give the profile its own key in the UI, select Claude Code login, then Anthropic API key. The default account continues to use the shared setting.
For a profile explicitly using API key authentication:
- Select it explicitly for Native UI tasks, Crews, Autoruns, or Fleet nodes. Native UI Auto and usage-limit recovery never select it, and a failed key never falls back to a subscription, shared key, or another account.
- Save a key before starting. Anthropic API key means a key is saved; API key not set means one is missing. These replace the signed-out status and sign-in button in Settings. Saving does not validate the key.
- Cockpit does not read subscription usage for this profile or report API usage or cost. Charges follow its API key.
- Terminal UI, including Auto and recovery, continues to use the profile's Claude Code sign-in. Changing the method does not sign out of Claude Code.
If an existing Auto task's current profile is changed to API key, its next start, reconnect, or retry stops with an error. Select that profile explicitly or choose another account. An unrecognized method also prevents Native UI startup.
cockpit accounts auth work --agent-type claude --mode api-key --key-file /secure/anthropic-key.txt
cockpit accounts auth work --agent-type claude --mode claude-code
cockpit accounts auth work --agent-type claude --mode inherit
cockpit accounts auth work --agent-type claude --reset-key
Provide keys only through --stdin or --key-file, never inline arguments or task messages. auth is local-only and supports named Claude profiles. Keys use encrypted storage with a separate entry per profile. Renaming preserves the key; removing the profile removes its key. Removing only the key leaves API key mode selected and prevents Native UI startup until another key is saved.
accounts list reports authMode and apiKeySet. Its loggedIn, authState, and authReason still describe Claude Code sign-in, so they are not a verdict on API key readiness. See the accounts reference for all options.
Rename a profile
Under Settings → Agents, use the pencil button on a named profile to change its display name. From the CLI, provide the current name or profile ID and the new name:
cockpit accounts rename work "Work (EU)" --agent-type codex
Only the display label changes. The profile ID, isolated home, stored credentials, and task and Autorun assignments remain intact, and the account does not need to sign in again. A profile can be renamed while a running task or Autorun uses it. The new name must be at most 40 characters and cannot be blank, contain control characters, duplicate another profile for the same agent, equal default, auto, or an existing profile ID, or start with profile-. The default account has no Cockpit-owned profile name and cannot be renamed.
Fleet YAML is the exception because account: <name> is resolved by name when a run starts. Update any Fleet file that uses the old name, or its next run will fail the pre-run account check.
The list reports the provider, profile ID, name, email when available, authState, provider-specific usage, and the time that usage was fetched. Grok Build also reports the reason for its authentication decision as authReason. authState distinguishes usable ok, invalid expired, and credential-free signed_out accounts. The compatibility field loggedIn is true only for ok. auth_required normally means the profile must sign in again. Cursor usage is requested with the Cursor CLI’s own sign-in, but a rejected usage request alone does not invalidate the CLI login. With valid CLI credentials, the account remains available for task launches, Auto, and Fleet, and the Usage screen offers to sign in again. Missing credentials or credentials that the CLI authentication check finds expired still require sign-in. A usage state of unknown or error means Cockpit could not read the allowance; it is not an authentication verdict, and a credential with authState: "ok" remains selectable below accounts with known capacity. Expired and signed-out accounts are unavailable to Auto and the Fleet pre-run check.
Grok Build access tokens last about six hours, but an expired access token remains selectable by Auto and Fleet when a refresh token is stored: the account reports authReason: expired_refreshable and authState: ok. Merely reading models or usage does not open interactive sign-in or refresh the token, so usage remains unknown or stale until renewal. The Grok Build CLI attempts renewal when the next task starts. A network problem reports network_failure without requiring sign-in. refresh_refused, expired_without_refresh, and provider_rejected require manual sign-in.
For agents that expose the default account's email address, Cockpit shows it on the default row in the account switcher and in that agent's authentication settings. It never borrows a named profile's address for the default row. An address that was not reported, a signed-out account, and a failed lookup remain distinct states so the display can also help diagnose authentication.
For Codex, Cockpit retrieves usage and rate limits from the Codex CLI app server in a read-only sandbox without approval prompts. This retrieval path supports Codex CLI 0.153.
Antigravity sign-in runs the official agy acp --login; Agy owns authentication and credential storage. Cockpit does not read, refresh, copy, or reinject its credential contents. Additional profiles are available only on macOS, where Cockpit verifies the profile Keychain is first before launching. Windows and Linux support the default account only because their OS keyring is shared. Existing profiles remain available for explicit rename or removal. Additional-profile login and native Windows/Linux ACP operation remain unverified.
For Claude’s default account, when Cockpit can verify the owner of the current credentials, it uses that email address in Settings, usage, task creation, and conversation account displays. When verification is unavailable, it may use the existing account record; the displayed address alone does not prove that the current owner was verified. Check the intended account before use.
Credential storage for additional accounts
From 5.2.1, Cockpit selects storage separately for each additional Codex account. Accounts with an auth.json file use file storage, allowing existing ChatGPT sign-ins to continue. Where an OS keyring is supported, accounts use it after that file is gone. Linux without Secret Service or KWallet retains file storage, and the default account follows its own configuration. This does not mean a ChatGPT sign-in has automatically migrated to the keyring. In 5.2.2, where an OS keyring is supported, Settings shows Sign in again to move it to the OS keyring. on a signed-in additional account that still uses file storage; signing in again moves it to the keyring. An API key in an additional account's file migrates through Codex's login command. Removing an additional account first signs it out and verifies logout; if this cannot be confirmed, Cockpit keeps the account and its folder.
On macOS, additional Antigravity accounts keep their Google token in separate Keychains whose passwords Cockpit stores in the OS secure store. Cockpit removes a legacy password file only after confirming the same password is stored there. A secure-store read failure preserves existing data. Downgrading to an older Cockpit can break this account's Keychain access; after downgrading, remove and add that account again. For Codex, an older version may require signing in again and store the result in a file; sign in again after returning to this version. See the account reference for migration details.
Respond to a sign-in notice
For Claude Code, Codex, Antigravity, Cursor, Qoder, and Grok Build profiles, Cockpit shows a desktop notification and an in-app notice when it detects expired sign-in. If task creation fails because every profile is signed out, it also explains that sign-in is missing. The notice identifies the agent and named profile when applicable. Select Sign in to open the relevant agent in Settings → Agents, then sign in to that account. Confirm authState: ok with cockpit accounts list --agent-type <type> before retrying.
The same state notifies once rather than on every refresh. Successful sign-in clears the notice and allows a later expiry to notify again. A usage-fetch error alone does not mean sign-in expired. AGI Lab membership sign-in is separate; see the account reference.
Check remaining quotas
Antigravity usage is checked only when the Desktop or PWA Usage panel opens, using agy -p "/usage" --output-format json. Account lists, CLI reads, automatic refreshes, and account selection use the cached reading or show unknown. Unsupported output and failures stay unknown; no private API, language-server, or history fallback is queried. Cockpit displays the model groups returned by Agy, such as Gemini Models and Claude and GPT models, with their five-hour and weekly remaining percentages and reset times when provided. Models within one group share that group’s limits. The command output was checked with Agy 1.5.11; unsupported versions can still report unknown. Refreshing an already open panel uses the cached reading; close and reopen it for another query. You can also check /usage directly in Agy.
Open Usage in Desktop to compare the reported allowances for each provider and account. Each quota shows its remaining percentage directly below the ring. Hover over or select a quota to see its account, allowance, reset time, and Resets in countdown when a reset time is available. The details also show the data source and last update; use Refresh usage to retrieve usage again. Cockpit does not invent a percentage for an unknown quota, authentication error, observation-only status row, or the Cockpit Agent balance display.
Claude accounts whose plans have no five-hour window still show the usage windows the provider supplies, including weekly or model-specific limits. The CLI omits usage.fiveHour for those accounts. Auto evaluates their available windows rather than treating the missing five-hour window as exhausted.
When Claude reports limit resets, each Claude account in Desktop shows the total unused count. Expand its details to see the remaining count, label, and expiration date for each grant. The CLI exposes the same information as limitResetsAvailable and limitResets in cockpit usage and cockpit accounts list --agent-type claude. Paused and expired grants are not counted. An omitted field means the account is ineligible, Claude did not provide the data, or Cockpit could not read it; it does not mean zero. Zero appears only when Claude explicitly reports an eligible account with no unused resets. Cockpit can only read these resets and cannot spend them.
When Claude extra usage is enabled and its current monthly spend is available, Desktop and the PWA show Extra usage this month with the spend and monthly limit in the same currency. An uncapped account shows no limit. The CLI reports extraUsage.usedCredits, extraUsage.monthlyLimit, and extraUsage.currency. Do not interpret an omitted field as zero spend. This amount is separate from the regular five-hour, weekly, and model-specific windows, purchased balances, and limit resets.
When Codex reports the purchased credit balance for a ChatGPT account, Usage displays the amount as Credits or shows Unlimited credits. The CLI exposes the same value as usage.credits in cockpit usage and cockpit accounts list --agent-type codex. The field is omitted both when the account has no purchased credits and when Codex did not report a balance, so absence does not mean a zero balance. Purchased credits are separate from reset credits that clear the current rate-limit window, and cockpit usage reset does not spend them.
The Desktop and PWA new-task screens show the same allowances for the selected agent and account before creation. A fixed account shows that profile. Auto does not substitute the default account's quota; it previews the account chosen by the same selection method used at runtime and labels it Auto · account name.
An exhausted quota remains visible at 0%. An unknown value appears as unavailable, and a missing reset time has no countdown. Check the reported authentication or retrieval status before deciding that an account is exhausted. These provider allowances are separate from conversation context usage.
When unused Claude limit resets are available, their details offer a link to Claude usage settings. The browser uses whichever Claude account is signed in there; confirm it before using a reset. Cockpit does not spend Claude resets itself.
Sign in from Usage
When an account requires authentication, its Usage card offers Sign in or Sign in again for that specific account. Follow the provider's login flow; while it runs, the action shows Signing in... and cannot be started again. After successful authentication, Cockpit refreshes the account's authentication and usage information. A usage-fetch error alone is not proof that login is required or that the allowance is zero.
Cards keep account and allowance information together. Open quota details to inspect the source and reset time rather than interpreting an unavailable measurement as an exhausted quota.
Spend a Codex reset credit
cockpit usage is read-only and reports Codex reset credits with their expiration dates. To clear the current rate-limit window for one Codex account, spend one credit explicitly:
cockpit usage reset --agent-type codex --account work --confirm
Reset credits are earned, finite, and expiring. Spending one cannot be undone or refunded, so --confirm is required. Omit --account to target the default account. The result distinguishes reset, nothingToReset, alreadyRedeemed, and noCredit; only reset consumes a credit. Read the cockpit usage reference before automating recovery.
Use Auto
For Claude, Codex, Grok Build, Cursor, and Qoder, new tasks, Autoruns, and Fleet nodes default to Auto. Antigravity always uses a fixed account; omitted or legacy auto selectors mean the default account, with no automatic rotation or usage-limit recovery. Select another Antigravity account manually when available.
Auto first requires remaining capacity in every applicable window, including shorter limits. It then compares accounts by the window with the latest reset and favors the account with the most remaining percentage per minute until that reset. This helps consume an underused weekly or other long-term quota that expires sooner. Shorter windows remain an immediate availability gate; they do not override the long-term ranking.
If an Auto task reaches a supported usage or plan limit, Cockpit selects another available account, transfers the saved session, and continues. Exhausted Claude usage credits and Codex workspace credits are included in this recovery. When no alternative is available, usage cannot be confirmed, or switching or resuming fails, the task reports the reason and waits for a person. After a recorded reset time passes, Cockpit re-evaluates that usage limit and resumes the same task when capacity has recovered. An expired credential cannot recover through a quota reset and must sign in again.
An Autorun resolves Auto again on every execution. Fleet can spread parallel nodes across available accounts instead of concentrating all work on one profile. Actual concurrency still depends on provider plans, usage limits, and machine resources.
Identify the account and limit
Mentioning a usage limit in ordinary conversation does not mark the execution account as exhausted. Tool output from another agent is also distinguished from the task's own account limit. For example, a Claude Code limit from a process started by a Codex task appears as a Claude notice and does not trigger a Codex account switch.
A Codex limit notice identifies the account, usage window, and reset time when known. If the provider did not name the window, the notice says so. usageLimitAttribution in cockpit task get <id> also identifies the restriction; explicit provider errors take precedence over cached usage data.
Terminal UI and Terminal do not overlay Cockpit's usage-limit banner on the conversation. Read the limit message from the provider CLI and inspect waitingReason, the reset time, and usageLimitAttribution in cockpit task get <id>. Limit detection, the waiting state, and Auto account recovery still run, but Cockpit's account-handoff explanation and switch-account button are not shown on a terminal surface.
Pin one account
Choose a named profile when audit, client, billing, or data-separation requirements must pin the execution account. Use --account from the CLI.
cockpit task create --instruction "Review this change" --directory /path/to/repo --agent-type codex --account work
cockpit autorun create --name "Daily review" --instruction "Review changes" --directory /path/to/repo --agent-type codex --account work --type cron --expression "0 9 * * *"
A pinned profile does not switch automatically after a usage limit. If a saved fixed profile becomes unavailable, Cockpit does not silently substitute another account. It disables the Autorun and marks it as needing attention.
Switch an active task
cockpit task account <task-id>
cockpit task account <task-id> work
cockpit task account <task-id> default
Claude, Codex, Grok Build, Antigravity, Cursor, and Qoder tasks can switch accounts while active. Cockpit stops the current runtime, transfers the saved conversation to the selected profile, and resumes the same task. A task may reject switching while it is generating a reply or immediately after startup, so wait until it can accept input.
The transfer fails safely if the source conversation is missing, busy, unreadable, or ambiguous. When the target profile already contains different history, Cockpit preserves that history as an archive before carrying the active conversation forward. A notice identifies cases where the target already had the same or newer conversation instead of silently replacing it.
After switching a task that stopped at a usage limit, send a follow-up to continue. While Auto is still switching an account, a Fleet node remains running and becomes interrupted only if recovery cannot complete. Switching does not merge provider-side billing or unrelated conversation histories.
Choose a Crew account
Use the account picker below a Crew’s composer to choose an account or Auto. The CLI equivalent is cockpit crew update <crew> --account <name|default|auto>. A switch requested during a reply takes effect after the turn, preserving the conversation, Queue, and chat connections. When Auto recovers from a usage limit, the Crew continues through its Queue. Changing agents keeps Auto but resets a fixed account to the new agent’s default. If the account cannot be applied, message delivery pauses and cockpit crew get <crew> reports the reason in account.error. Repeat the account setting to retry.
The usage-limit option to continue with another agent checks a model available to the selected account. Crews are offered only supported agents. Switching a Crew’s agent starts a new session without transferring the full previous conversation; a notice at the front of its Queue asks it to check its state and continue. If the check takes more than 20 seconds, the switch is not accepted.
When a Crew stops at a usage limit, selected Ask DM recipients on Discord, Slack, and Chatwork can choose to continue with another available account (when not already using Auto), choose another supported agent with a usable account, or wait for the reset. Only current owners can act. Unavailable or stale choices must be made again in Cockpit. These controls do not bypass the provider's limits; switching agents starts a new session as described above.
Sign out of Antigravity
cockpit accounts logout supports Antigravity only. Without --confirm, it is a read-only preview that reports the target Keychain or keyring items and token files, shared state, and impact. Review that result before repeating the same command with --confirm.
cockpit accounts logout work --agent-type antigravity
cockpit accounts logout work --agent-type antigravity --confirm
Logging out a named profile targets only that profile's storage and does not change the host login. Logging out the default account removes the host Antigravity credential, which also signs out any other profile or ordinary terminal-launched Agy process that relied on that shared login. On Windows, Linux, or a macOS profile whose profile Keychain is unavailable, the profile preview reports the effective host item as sharedCredential and points to the default-account logout procedure. Cockpit never logs an account out automatically.
Existing Antigravity profiles are never signed out automatically. Profiles created through the earlier Cockpit sign-in show a notice: review cockpit accounts logout <profile> --agent-type antigravity, repeat with --confirm, then use cockpit accounts login <profile> --agent-type antigravity on macOS. The default account needs no migration.
An existing profile Keychain item without Cockpit's placeholder fingerprint is unconfirmed. Its metadata alone cannot distinguish a signed-out placeholder from a login, so Cockpit keeps it without treating it as sign-in evidence. Use the explicit profile logout and sign-in procedure above; Cockpit does not inspect credential contents.
The logout preview includes an existing unconfirmed or signed-out profile item. Explicit confirmation resets its placeholder baseline; cancelling writes nothing. A profile logout never adds the host item to its removal targets.
Remove a profile
cockpit accounts remove work --agent-type codex --confirm
The default account cannot be removed. Removing a named profile requires confirmation and is rejected while a task or Autorun uses it. Change those consumers to Auto, default, or another profile first. Removal makes that profile's isolated authentication and saved data unavailable, so verify both the provider and name.
See Agents and models for capability differences, Task details for stopped-task handling, the cockpit accounts reference for the exact command contract, and Security and data for credential boundaries.