# Several accounts per engine

Settings -> Providers. If you have more than one subscription (two Claude accounts, two ChatGPT accounts), Harness can
keep them all signed in and use one at a time: you pick which, or Harness moves to the next one by itself when the
usage limit of the current one is reached. API keys are not concerned: a provider keeps one key.

Each provider decides in its terms whether several accounts may be used this way: check yours.

## Add an account

With one account, Settings -> Providers only shows a discreet **Add another account** under its subscription. Click it,
give the account a name if you like, then sign in the usual way for that engine:

- **Claude Code**: paste the token of the other account (`claude setup-token`, as in Settings -> Engine);
- **Codex**: the sign-in by code (open the link, type the code) with the other ChatGPT account.

The account you were signed in with stays; the new one becomes the active one. From the second account on, the list
appears: the **Active** badge, **Use this account**, **Rename** and **Remove**. Removing the active account activates
another one; removing the last one signs Harness out of that subscription.

The same from a terminal: `maxxing engines accounts` lists them, `maxxing engines accounts use claude-code Work`
switches (the name or the id).

## Switch

**Use this account** changes the account for everything that starts from then on: sessions, agents, scheduled jobs,
Telegram. A turn that is already running keeps the account it started with. The quota shown in the sidebar follows the
account in use once it has been seen again in a turn.

## Switch automatically

The checkbox **Switch account automatically when the usage limit is reached** (off by default, shown from the second
account) is valid for sessions, agents and scheduled jobs:

- when a turn stops on the usage limit, that account is marked "limit reached, back at HH:MM" and Harness runs **the
  same message again, once**, with the next account that is not limited. The conversation says it ("Usage limit reached
  on Work: switched to Home, the message runs again") and a notification is posted in the feed;
- an agent run or a scheduled job that was switched does not also wait for the reset;
- when the active account is already known to be limited, the switch is made before the turn starts;
- when every account is limited, nothing is switched: the turn stops as it always did (a job or an agent waits for the
  reset, see Usage -> Limit retry) and the conversation says when the first account is back;
- a message is retried at most once: it never bounces between accounts.

If the message does not tell when the limit ends, the account is skipped for one hour.

## Limits

- A turn already running is never moved.
- Conversations are resumed under the new account: this was checked with test programs, **not on real accounts of
  every provider**. If a provider refuses to continue a conversation started under another account, the message says so.
- **Codex accounts were not verified on a real ChatGPT plan.** Codex renews its sign-in in place; Harness recognizes the
  account by the identity inside the sign-in and puts the active account back if a turn of the previous one rewrites it.
- The sign-ins are stored in `secrets.json` of Harness's state folder (never in the backup) and are never shown in the
  interface, the API, the logs or the notifications.
