Accounts and profiles
If you have two accounts of one agent, say a work and a personal Claude Code subscription, cornercase can keep both logged in and start each new agent with the one you pick, in one click.
- An account is a folder of its own in which the agent keeps its login. cornercase hands the folder to the agent through the variable it already reads:
CLAUDE_CONFIG_DIRfor Claude Code,CODEX_HOMEfor Codex,GEMINI_CLI_HOMEfor Gemini CLI. - Each agent also has its own login, the usual one in
~/.claude,~/.codexor~/.gemini, called System until you give it a name. - For each agent you choose the account new tabs start with. Tabs that are open keep the one they started with.
cornercase never reads, copies or refreshes a token: you log in with the agent itself, in its account’s folder.
Everything here can be done in the window (Settings › Accounts and the status bar at the bottom of the window) or from the command line (cornercase account).
Add an account
Section titled “Add an account”In Settings › Accounts, click + add account under the agent and type a name. cornercase makes the folder, closes Settings and opens a tab named personal login that runs claude auth login with it (codex login for Codex, gemini for Gemini CLI, where you log in from its first screen). Log in there once.
Each agent’s section starts with its own login, then its accounts. Each one says whether it is logged in, and as whom (signed in as ana@acme.dev (max), signed out). cornercase asks the agent itself (claude auth status, codex login status) when you open the tab and every 30 seconds while it shows; it never opens the files the login is kept in. Gemini CLI has no such command, so its accounts show no state. When a token variable such as ANTHROPIC_API_KEY is set where the server runs, a line at the top names it: it wins over every account (see below).
From the command line:
cornercase account add claude personal --loginThis makes the folder and opens a tab named personal login that runs claude auth login with it. Without --login, use the account, open a tab and log in as you would anywhere.
An account’s folder name is letters, digits, ., _ and -, at most 32. cornercase account list shows each agent’s own login and accounts, with their folders and names, marks the one in use, and --check asks each one whether it is logged in first.
Name an account
Section titled “Name an account”rename… under an account, or under the agent’s own login, gives it the name the window shows: in the buttons, the tabs, Usage and the start dialogs. Call Claude Code’s own login work and you can tell it from personal at a glance. The folder never moves, since Claude Code finds its login by the folder’s path and a new path would log it out; an empty name goes back to the folder’s name (or System). Two accounts of one agent cannot have the same name.
cornercase account rename claude --system work # the agent's own logincornercase account rename claude personal Personalcornercase account rename claude personal --clear # back to its folder's nameCommands always name an account by its folder (and --system for the agent’s own login), never by the name the window shows.
What the accounts share
Section titled “What the accounts share”A new account links the settings of the agent’s usual folder (~/.claude, ~/.codex, ~/.gemini), so your instructions, skills and commands are the same in every account:
| Agent | Shared | Kept per account |
|---|---|---|
| Claude Code | settings.json, settings.local.json, CLAUDE.md, agents/, commands/, skills/, plugins/, output-styles/, hooks/, keybindings.json, statusline* |
the login, .claude.json, history, sessions and transcripts, caches |
| Codex | config.toml, AGENTS.md, prompts/, skills/, rules/ |
auth.json, sessions, history, logs |
| Gemini CLI | settings.json, GEMINI.md, commands/, extensions/, skills/, policies/, trustedFolders.json |
the login, .env, history |
They are symbolic links, made again before each agent starts if one is missing. When an agent saves a setting by replacing a file (a /model choice in Claude Code, a trusted project in Codex’s config.toml), the link becomes a file of that account only: account list names it as not shared, and cornercase never overwrites it. Delete the file and the next start links it again.
Choose the account new tabs use
Section titled “Choose the account new tabs use”Once you have an account, a status bar along the bottom of the window, under the sidebar, the panes and the side panel, has a button per agent with accounts, such as claude: work ▾. Click it to see that agent’s own login and accounts, the one in use with a check mark, and click another to use it. manage accounts… opens Settings › Accounts. The bar is there in every layout, the compact one too, and the panes give it one row while it shows. When there is no room for every button, they shorten to the account’s name (work ▾), and then the last ones are left out.
In Settings › Accounts, Enter on a row (or a click) does the same; ● marks the one in use.
From the command line:
cornercase account use claude personal # new claude tabs use personalcornercase account use claude --system # back to its own loginChoosing changes only what starts afterwards, and only for that agent. Tabs that are open keep the account they started with, so you can have a work agent and a personal agent side by side. A split takes the accounts of the pane it splits. Typing claude in a new tab uses the account in use too: the folder is in the tab’s environment.
Another account once
Section titled “Another account once”To start one agent with another account without changing the one in use, pick it in the account list that opens when you start an issue (or ahead with account… on its page), in the agent’s account list when you start a flow (one list per agent of the team that has accounts), or in the Account list beside the agent when you schedule one. Each starts on the account in use. From the command line, --account AGENT=ACCOUNT (once per agent; AGENT= is its own login):
cornercase start claude --account claude=personal --prompt 'fix the tests'cornercase new-tab --account claude= --account codex=teamcornercase flow run 'Full issue' --account claude=personal --prompt 'add gift cards'cornercase queue add --at 18:00 --prompt 'update the docs' --account claude=personalIf the account you picked is removed before the agent starts, nothing starts: the issue’s and the flow’s dialogs say so, and a scheduled agent fails when its time comes and says why. A scheduled agent with no account picked starts with the one in use at that moment. A flow’s team keeps the accounts it started with if you change the one in use while it runs.
Profiles, for scripts
Section titled “Profiles, for scripts”A profile picks one account per agent under a name, so a script can switch several agents at once. The window never shows or changes profiles: while one is active, the buttons show its accounts, and choosing an account in the window leaves the profile.
cornercase profile new Work claude=work codex=workcornercase profile use Work # new tabs use Work's accountscornercase profile use --system # every agent back to its own logincornercase profile list # the active one is marked with *profile set Work --provider codex --account personal changes one agent of a profile, and without --account that agent goes back to its own login; profile set Work --rename Job renames it; profile delete Work deletes it and keeps its accounts. A profile cannot be named system, in any case: that name stands for every agent’s own login, which profile use --system chooses (it also forgets the accounts chosen in the window). --profile NAME on start, new-tab and flow run uses a profile once; --account wins over it for its agent.
Which account an agent uses
Section titled “Which account an agent uses”Once you have an account, an agent’s tab names it on its second line, after the model: Opus 5.5 · work · 12%. So do the tab bar and the agents section. A narrow column cuts the model first, then the account. An agent on its own login shows that login’s name, or System, while the agent has accounts, and nothing otherwise; one whose folder variable points somewhere you set yourself shows custom.
Settings › UI has three switches, on by default and shown only once you have an account: account for that mark, account switcher for the buttons above Usage, and account picker for the account lists in the issue, flow and schedule dialogs.
cornercase status --json gives each agent’s pane an account: the account’s folder name, or custom when its folder variable points somewhere else (one you exported by hand). A pane without one has no account key. When cornercase restarts, each agent resumes its conversation with the account it had; if that account was removed meanwhile, the pane comes back as a plain shell and a message names the account.
Plan usage per account
Section titled “Plan usage per account”Usage › Limits shows a section for each account of Claude Code and Codex, after the one for their own login, each titled by its name, and marks with ● the account new tabs use. cornercase usage prints the same, and its JSON gives each entry its account, its label and whether it is active.
Remove an account
Section titled “Remove an account”Select it in Settings › Accounts and press Backspace: a dialog asks first and reminds you to log out before (see below). Or:
cornercase account remove claude personalIt asks first, then deletes the account’s folder and forgets its name; an agent that used it goes back to its own login, and so does every profile that named it. The agent’s own login cannot be removed.
Things to know
Section titled “Things to know”- The folder’s path is the login. Claude Code finds its login in the keychain by the exact path of its folder, and the folders live in cornercase’s state folder (
~/.local/state/cornercase/accounts/, see Files). If you move that folder, setXDG_STATE_HOMEto another place or run a server withCORNERCASE_SOCKET, the path changes and each account has to log in again. A build from source (cargo run) has its own accounts. - Tokens in the environment win.
ANTHROPIC_API_KEY,CLAUDE_CODE_OAUTH_TOKEN,CODEX_API_KEY,OPENAI_API_KEYand the like override the folder’s login. cornercase leaves them as they are, and Settings › Accounts andaccount listname the ones set (never their values); unset them in the environment the server starts from if you want the accounts to decide. - Gemini CLI with encrypted storage shares one login. With
GEMINI_FORCE_ENCRYPTED_FILE_STORAGE=true, Gemini CLI keeps its login in one keychain item for every folder, so its accounts cannot be told apart. Leave it unset to use accounts. - Which agents. Claude Code, Codex and Gemini CLI. GitHub Copilot CLI, Cursor CLI and Grok Build may keep their login in a place that does not depend on the folder, so they are left out until that is checked; opencode uses providers of its own.
- From a program: the requests are
account-list,account-add,account-remove,account-rename,account-use,profile-list,profile-new,profile-set,profile-useandprofile-delete;start,new-tabandflow-runtakeprofileandaccounts, and the queue’s entriesaccounts;cornercase contractlists the featuresaccounts,account-login(account-listwithcheck) andaccount-switch(account-rename,account-useand theaccountsfield). See Scripts and agents.