Skip to content

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_DIR for Claude Code, CODEX_HOME for Codex, GEMINI_CLI_HOME for Gemini CLI.
  • Each agent also has its own login, the usual one in ~/.claude, ~/.codex or ~/.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).

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.

SettingsWorktreesAgentsAccountsFlowsIssuesUIRemotePluginsClaude Codeworksigned in as ana@acme.dev (max)claude's own login·~/.clauderename…a name for the window; its folder stayspersonal signed in as ana@example.com (pro)~/.config/cornercase/server.accounts/crename…a name for the window; its folder stays+ add accountmakes its folder and opens a tab to log inCodexSystemcodex's own login·~/.codexrename…a name for the window; its folder stays+ add accountmakes its folder and opens a tab to log inGemini CLISystemgemini's own login·~rename…a name for the window; its folder stays+ add accountmakes its folder and opens a tab to log in
Claude Code's own login, called work, and a personal account, each logged in.

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:

Terminal window
cornercase account add claude personal --login

This 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.

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.

Terminal window
cornercase account rename claude --system work # the agent's own login
cornercase account rename claude personal Personal
cornercase account rename claude personal --clear # back to its folder's name

Commands always name an account by its folder (and --system for the agent’s own login), never by the name the window shows.

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.

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.

IssuesChangesTODOworkpersonalmanage accounts…claude: work▾
Claude Code's button opens its accounts.

In Settings › Accounts, Enter on a row (or a click) does the same; ● marks the one in use.

From the command line:

Terminal window
cornercase account use claude personal # new claude tabs use personal
cornercase account use claude --system # back to its own login

Choosing 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.

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):

Terminal window
cornercase start claude --account claude=personal --prompt 'fix the tests'
cornercase new-tab --account claude= --account codex=team
cornercase flow run 'Full issue' --account claude=personal --prompt 'add gift cards'
cornercase queue add --at 18:00 --prompt 'update the docs' --account claude=personal

If 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.

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.

Terminal window
cornercase profile new Work claude=work codex=work
cornercase profile use Work # new tabs use Work's accounts
cornercase profile use --system # every agent back to its own login
cornercase 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.

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.

Workspaces▾main↓2▸nvim›bash+ Tab▾feat/dark-mode◐claudeOpus 5.5·work·7%◐claudeOpus 5…·personal·12%+ Tab↓2 more+ NewIssuesChanges 1FilesTODOSettingsUsageQuitclaude: personal▾
Two Claude Code agents side by side: the second one started after switching to personal.

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.

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.

3 #[derive(Debug, Deserialize)]4 pub struct Address {5 pub lines: Vec<String>,6 pub city: String,7 pub postcode: String,UsageLimitsStatsClaude Code·work·max planupdated just nowsession (5h)34%·resets in 2h 14mweek81%·resets in 3d 4hweek·Opus12%·resets in 3d 4hClaude Code·personal·pro planupdated just nowsession (5h)8%·resets in 4h 23mweek19%·resets in 3d 4hweek·Opus0%·resets in 3d 4hCodex·plus planupdated just nowsession (5h)22%·resets in 3h 41mweek9%·resets in 4d 10hdonehanges~TODO~~~src/returns/address.rs 11,1
The limits of each account, the one in use marked.

Select it in Settings › Accounts and press Backspace: a dialog asks first and reminds you to log out before (see below). Or:

Terminal window
cornercase account remove claude personal

It 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.

  • 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, set XDG_STATE_HOME to another place or run a server with CORNERCASE_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_KEY and the like override the folder’s login. cornercase leaves them as they are, and Settings › Accounts and account list name 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-use and profile-delete; start, new-tab and flow-run take profile and accounts, and the queue’s entries accounts; cornercase contract lists the features accounts, account-login (account-list with check) and account-switch (account-rename, account-use and the accounts field). See Scripts and agents.