# How to switch accounts in Cursor, editor and CLI

> Cursor keeps one account per install. Sign out in Cursor Settings and sign in again, or run agent logout and agent login. Two at once? A key per account.

Source: https://shuriken.sh/guides/cursor-switch-account

Cursor holds one signed-in account per installation, so to switch you sign out from Cursor Settings › Account and sign in as the other account, or run agent logout and then agent login in the CLI. To use two accounts side by side in the CLI, give each terminal its own Cursor API key.

By Shuriken Updated 27 October 2026 6 min read

**Contents**

To switch accounts in Cursor, sign out and sign back in as the other account, because one installation holds one account. In the editor that is Cursor Settings › Account › Sign Out. In the CLI it is agent logout, then agent login, and agent status confirms who you are. For two accounts at once, give each terminal its own API key.

We read Cursor's CLI docs, help pages and terms on 24 October 2026. The editor's menu path isn't written in Cursor's docs, so for that part we quote Cursor's forum and say so.

## How to switch accounts in the Cursor editor #

Cursor has no account switcher. A Cursor staff member answered the question on Cursor's forum on [7 July 2026](https://forum.cursor.com/t/switch-cursor-accounts/164829): "Right now, Cursor only supports one signed-in account per installation, and there isn't a separate account switcher yet." Switching is a sign-out and a sign-in:

- Open Cursor Settings with Cmd+Shift+J on a Mac or Ctrl+Shift+J on Windows and Linux (the shortcut is from Cursor's [privacy help page](https://cursor.com/help/security-and-privacy/privacy)).
- Go to Account and choose Sign Out. The Command Palette (Cmd+Shift+P) has a Sign Out command that does the same.
- Sign in again and pick the other account in the browser.

For two accounts open at the same time, the same reply gives two routes: a separate user account on your computer for each Cursor account, or launching Cursor with a separate --user-data-dir.

The browser page you sign in on has moved. Cursor's [sign-in domains page](https://cursor.com/help/troubleshooting/sign-in-domains) says sign-in runs on accounts.spacex.ai and accounts.x.ai in place of authenticator.cursor.sh, and that the old page stops working as a fallback on 30 October 2026. The move signed nobody out. On a work network with an allowlist, the two new domains need to be on it.

### Log out of Cursor on every device #

Signing out in the editor ends only that installation's session. To end the others, Cursor's [compromised-account page](https://cursor.com/help/security-and-privacy/account-compromised) gives the steps: open cursor.com/dashboard, click My Settings, scroll to Active Sessions and click Revoke next to each session. The page lists no way to revoke them all in one click.

## Does Cursor keep your chat history after you switch accounts? #

Cursor's docs don't answer this directly. The staff reply does: "Chat history, rules, and the codebase index are stored locally on your machine, so they stay after you sign out." Projects aren't tied to an account either. That is a forum answer from Cursor's team, not a page in its documentation.

Deleting an account is a different matter. Cursor's [delete-account page](https://cursor.com/help/account-and-billing/delete-account) lists chat history and settings among what goes, while local project files stay. That matters if you were thinking of moving to a new email address: Cursor can't change the email on an existing account, and its [change-email page](https://cursor.com/help/account-and-billing/change-email) offers a new account as the only way round, which means losing the old one's chat history.

## Switch accounts in the Cursor CLI: agent login, status and logout #

The CLI has its own sign-in commands. Cursor's [CLI authentication page](https://cursor.com/docs/cli/reference/authentication) gives three commands:

- agent status shows whether you're signed in, your account information and the endpoint in use. agent whoami is the same command.
- agent logout signs out and clears the stored credentials. Inside a running session, /logout does it too.
- agent login opens your browser to sign in. On a server or over SSH, run NO_OPEN_BROWSER=1 agent login: it prints the sign-in link instead, and you open it in a browser on another machine.

After a successful login, the docs say, "your credentials are securely stored locally". They don't say where, and they list no flag or variable that keeps a second sign-in somewhere else, so plan on one CLI login per machine.

The CLI changelog for v2026.10.22 also mentions agent team switch, in an entry about self-hosted workers: a worker runs under the team you picked at agent login or with agent team switch, not your account's default team. The command reference doesn't list it, and it changes the team, not the account you're signed in as.

On an older install the command is cursor-agent. Cursor's [announcement of the January 2026 CLI release](https://forum.cursor.com/t/cursor-cli-jan-8-2026-new-commands-and-performance-improvement/148372) says "The new primary entrypoint is agent (cursor-agent still works as an alias)", so cursor-agent status, cursor-agent logout and cursor-agent login behave the same way.

Shuriken moves a running chat to another of your own accounts when one reaches its limit, on every device.

[Download](https://shuriken.sh/download)

## Work and personal Cursor accounts at once: CURSOR_API_KEY #

API keys are how the CLI runs as two accounts without logging out. Create a user API key in each account at Cursor Dashboard › API Keys (cursor.com/dashboard/api), signed in as that account. Then hand the CLI the right one per terminal, in either of the two ways the docs give:

bash
# one terminal, the work account
export CURSOR_API_KEY=your_work_key
agent status

# or for a single run, with the personal account's key
agent --api-key your_personal_key "fix the failing test"

Run agent status in each terminal and check that it names the account you expect before you start. The variable is the better habit: a key typed after --api-key ends up in your shell history. Cursor's docs offer API keys for scripts and CI and recommend the browser login otherwise, so a key per account uses a documented option, not a workaround.

A work key is your employer's business too. On Enterprise teams, Cursor's [team members page](https://cursor.com/docs/account/teams/members) says admins can see and revoke the personal API keys members create, and a revoked key fails at once.

## Is it against Cursor's terms to have multiple accounts? #

Cursor's [Terms of Service](https://cursor.com/terms-of-service), last updated on 3 September 2026, don't mention multiple accounts or free trials. They make you responsible for keeping your account and password confidential and for "all activities that occur under your account", and section 1.5 forbids, among other things, renting, leasing or selling the Service. So a separate work account and personal account, each used by you, isn't something the terms address. Handing your login to someone else is.

Free trials are policed in the product rather than in the terms. People on Cursor's forum have quoted the message Cursor shows when it counts too many trial accounts on one machine: "Too many free trial accounts used on this machine." with "We have this limit in place to prevent abuse." ([forum thread](https://forum.cursor.com/t/trial-account-does-not-work/132628)). Don't create accounts to get more trials, and don't use tools that reset Cursor's machine ID to get around that check. Only add accounts you own and are entitled to use; providers' terms may not allow sharing a subscription sign-in.

The same questions for other agents: [Codex CLI](https://shuriken.sh/guides/codex-cli-switch-account) keeps one sign-in per home folder, and [Copilot CLI](https://shuriken.sh/guides/copilot-cli-switch-account) can hold several GitHub accounts at once.

## How Shuriken runs Cursor with several accounts #

Shuriken is a harness that runs [67 coding agents](https://shuriken.sh/features/coding-agents) on your own computers, Cursor's CLI among them. It starts the CLI under its older name, cursor-agent, the alias Cursor kept. In Shuriken a Cursor source is always an API key. Claude Code and Codex let us move each account's sign-in into its own folder, so Shuriken can hold several of their sign-ins side by side. Cursor's CLI has no documented setting for that, so the app offers one way to add a Cursor source: Add source › Cursor › add an API key.

Add a key from each Cursor account you use and each one becomes a source. A chat on that source gets its key in CURSOR_API_KEY, the variable from the steps above, and Use on a source makes it the Cursor key your chats run on, on every computer at once. The Free plan holds two sources, which covers one work and one personal key.

One limit to know: Shuriken reads no usage for Cursor keys, so the app shows no usage readings for them. Every agent's version of this, side by side, is in [multiple accounts in every coding agent CLI](https://shuriken.sh/guides/coding-agent-multiple-accounts). If you're weighing Cursor against Anthropic's agent, [switching from Cursor to Claude Code](https://shuriken.sh/guides/switch-from-cursor-to-claude-code) covers moving your rules and MCP servers, and [Shuriken vs Cursor agents](https://shuriken.sh/compare/cursor) compares Cursor's cloud agents with agents on your own machines. To run Cursor next to your other agents, [download Shuriken](https://shuriken.sh/download).

Share

[X](https://x.com/intent/post?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fcursor-switch-account&text=How%20to%20switch%20accounts%20in%20Cursor%2C%20editor%20and%20CLI)[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fcursor-switch-account)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fshuriken.sh%2Fguides%2Fcursor-switch-account&t=How%20to%20switch%20accounts%20in%20Cursor%2C%20editor%20and%20CLI)[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fcursor-switch-account&title=How%20to%20switch%20accounts%20in%20Cursor%2C%20editor%20and%20CLI)[E-mail](mailto:?subject=How%20to%20switch%20accounts%20in%20Cursor%2C%20editor%20and%20CLI&body=https%3A%2F%2Fshuriken.sh%2Fguides%2Fcursor-switch-account)

## Sources

- [Cursor docs: CLI authentication](https://cursor.com/docs/cli/reference/authentication) (accessed 24 October 2026)
- [Cursor docs: CLI parameters and commands](https://cursor.com/docs/cli/reference/parameters) (accessed 24 October 2026)
- [Cursor docs: CLI slash commands](https://cursor.com/docs/cli/reference/slash-commands) (accessed 24 October 2026)
- [Cursor docs: CLI changelog (v2026.10.22)](https://cursor.com/docs/cli/changelog) (accessed 24 October 2026)
- [Cursor forum: Cursor CLI (Jan 8, 2026), new commands](https://forum.cursor.com/t/cursor-cli-jan-8-2026-new-commands-and-performance-improvement/148372) (accessed 24 October 2026)
- [Cursor forum: Switch Cursor accounts](https://forum.cursor.com/t/switch-cursor-accounts/164829) (accessed 24 October 2026)
- [Cursor help: Compromised account (Active Sessions)](https://cursor.com/help/security-and-privacy/account-compromised) (accessed 24 October 2026)
- [Cursor help: Privacy and data (opening Cursor Settings)](https://cursor.com/help/security-and-privacy/privacy) (accessed 24 October 2026)
- [Cursor help: Which domains does Cursor sign-in need?](https://cursor.com/help/troubleshooting/sign-in-domains) (accessed 24 October 2026)
- [Cursor help: Change your email address](https://cursor.com/help/account-and-billing/change-email) (accessed 24 October 2026)
- [Cursor help: Delete your account](https://cursor.com/help/account-and-billing/delete-account) (accessed 24 October 2026)
- [Cursor docs: Team members (members' API keys)](https://cursor.com/docs/account/teams/members) (accessed 24 October 2026)
- [Cursor Terms of Service (last updated 3 September 2026)](https://cursor.com/terms-of-service) (accessed 24 October 2026)
- [Cursor forum: Trial account does not work](https://forum.cursor.com/t/trial-account-does-not-work/132628) (accessed 24 October 2026)

## Frequently asked questions

**How do I log out of Cursor?**

In the editor, open Cursor Settings, go to Account and choose Sign Out, or run Sign Out from the Command Palette. In the CLI, run agent logout, or type /logout inside a session.

**How do I see which Cursor account the CLI is using?**

Run agent status (agent whoami does the same). It shows whether you are signed in, your account information and the endpoint the CLI talks to.

**Can I be signed in to two Cursor accounts at once?**

Not in one installation: Cursor's staff said on its forum on 7 July 2026 that it supports one signed-in account per installation. For the editor they suggest a separate user account on your computer or a separate --user-data-dir. In the CLI, a separate API key per account lets two terminals run as two accounts.

**Do I lose my Cursor chat history when I switch accounts?**

Not when you sign out. A Cursor staff member wrote on its forum that chat history, rules and the codebase index are stored locally and stay after you sign out; the docs themselves don't say. Deleting an account is different: Cursor's help page says its chat history goes with it.

**Does the cursor-agent command still work?**

Cursor renamed the CLI command to agent in January 2026 and said cursor-agent still works as an alias. Cursor's current docs only use agent.

Source switching

One account runs dry. The next one takes over.

Add the Claude, Codex and Gemini accounts you own. At your switch point, your chats move to another of them and keep going.

[Download](https://shuriken.sh/download)

[Other platforms](https://shuriken.sh/download#main)

## Keep reading

- [How to switch Claude accounts without logging out: Guide 27 Oct 2026 7 min read Three ways to use several Claude accounts in Claude Code without /logout and /login: one config per account, a switcher CLI, or a harness.](https://shuriken.sh/guides/switch-claude-accounts-without-logging-out)
- [Can you have multiple Claude accounts?: Guide 27 Oct 2026 8 min read Yes. Anthropic's terms set no cap on accounts per person, and its phone check allows three per number. Sharing a login and dodging a ban are not allowed.](https://shuriken.sh/guides/multiple-claude-accounts-rules)
- [Claude's 5-hour limit, explained: Guide 27 Oct 2026 6 min read Claude's 5-hour window starts with your first message and resets five hours later. An idle account has no window running, so it saves nothing up.](https://shuriken.sh/guides/claude-5-hour-limit-explained)
- [Claude usage limit reached? What to do next: Guide 27 Oct 2026 6 min read There's no early reset for Claude's 5-hour or weekly limit. Wait, pay for usage credits, switch to an API key, or carry on with another account you own.](https://shuriken.sh/guides/claude-limit-reached-what-to-do)
- [How to check your Claude Code usage: Guide 27 Oct 2026 6 min read To check Claude Code usage, type /usage or open Settings › Usage on claude.ai. Both read one pool: your 5-hour session and your weekly limit.](https://shuriken.sh/guides/check-claude-code-usage)

## Free tools

- [Claude limit reset tracker](https://shuriken.sh/tools/limit-resets/claude)
- [Codex limit reset tracker](https://shuriken.sh/tools/limit-resets/codex)
