Accounts

Save more than one account for a provider, rank them, switch one session at a time, and let hob move on when an account runs out of quota.

hob can keep several accounts of one provider side by side: subscription logins and saved API keys. Each session uses one account, and you can switch it without effect on the other sessions.

Saved accounts work with OpenAI today. Other providers use their API key or their single login, as Providers describes.

Add an account

Sign in once for each account:

Terminal
hob auth login openai

A new login adds an account. It does not replace the accounts that you saved before. You can also add an account from the account picker in hob.

Command What it does
hob auth login [provider] Signs in, or saves a key. Without a provider, hob asks which one.
hob auth status Shows the accounts and the sign-in state of every provider.
hob auth default <provider> <account> Moves an account to the top of the list, so new sessions start on it.
hob auth logout <provider> --account <account> Removes one saved account.

<account> is the email, the id, or the start or the end of an id, as hob auth status shows it.

Switch the account of a session

/account, or Alt+A, opens the account picker. The status bar shows the account of the session next to the provider and the model.

Key in the picker What it does
↑ / ↓ Moves the selection.
Enter Switches this session to the selected account.
Shift+↑ / Shift+↓ Moves the selected account up or down the list.
Space Moves the selected account to the top of the list.
Esc Closes the picker.
  • A switch changes only the focused session. Other tabs and other hob processes keep their accounts.
  • hob switches only when the session is idle. If the agent runs, finish or cancel the run first.
  • The history, the tools, and the cost of the session stay as they were.
  • To reorder accounts, clear the search text of the picker first.

The order of the accounts

The list of saved accounts is an order of preference. The first account is the preferred one.

  • A new session starts on the first account that it can use.
  • A change of the order applies to new sessions and to the next failover. It does not switch a session that runs.
  • An API key from the environment, such as OPENAI_API_KEY, shows below the saved accounts. You can pick it with Enter, but hob never moves to it or from it by itself.

When an account runs out of quota

When the provider says that the quota of the account is used up, hob sends the same request again on the next account in the list that it can use. The session then stays on that account. A later quota error starts again from the top of the list.

For example, with the accounts A, B, and C: a session on B stays on B after A gets its quota back. When B runs out, hob tries A first, then C.

hob does not move from a subscription to a paid API key by itself. To allow that move, set allow_paid_account_fallback in providers.toml:

~/.config/hob/providers.toml
[openai]
allow_paid_account_fallback = true

The setting allows only a move to another saved account of the same provider. It never allows a move to a key from the environment, to another model, or to another provider. Without it, hob skips the paid accounts and tells you why, if no other account can take the request.

Keyboard shortcuts

Go to

On this page

  • jkNext or previous section
  • 12…The section with that number
  • cCopy the install command
  • iDownload
  • dDocs
  • []Previous or next page

Anywhere

  • ?Show or hide this list
  • EscClose, or stop a "g"