Skip to article
HB CodeDocsGet the app

HandbookStart here

Setup: sign-ins, regions, and remote access

This chapter explains the separate sign-ins for HB Code and each agent, when the agent sign-in comes, and where limits and usage show. It also explains optional API keys, one region per account, the remote-access switch, and the connected preview before HB Code Pro.

Checked against the source on 5 October 2026

On this page

Sign-ins and optional keys

Each sign-in applies to one part of the path from phone to model
Each sign-in applies to one part of the path from phone to modelA turn sent from a phone travels through the regional server and the desktop app to the session’s agent: the Codex child and on to OpenAI, or the Claude agent host and on to Anthropic. The HB Code account covers the phone, the regional server, and the desktop app. The ChatGPT account covers the Codex child and OpenAI, and the Claude account covers the Claude host and Anthropic, including turns sent from a phone. Only plans and usage limits travel back to the phone. An optional personal API key lets the desktop app reach OpenAI or Gemini without the Codex child. Without an HB Code sign-in on the desktop, phones cannot reach it. Signed out of an agent, only that agent’s new turns stop.
plans and usage limits reach the phone, agent credentials do not
Phone
Regional serverUS or EU
Desktop appRust runtime
Codexchild process
OpenAIor Gemini
Claudeagent host
Anthropicmodels
your computer
HB Code account · one region
device list · relay · push alerts · phone dictation · 10-day preview
ChatGPT account
agent turns · usage limits
Claude account
agent turns · usage limits · added accounts
your API key
skips the agents
optional · desktop dictation · speech and video tools
No HB Code sign-in on the desktop: phones can’t reach it, and everything else on the desktop still works.
Signed out of an agent: its sessions, history, and files still open. Only its new turns stop.
  • HB Code accountAuth0 · PKCE

    Each device signs in by itself, to the same account in the same region, and the desktop needs it only for remote access. If a phone can’t find the desktop, check this sign-in and the region.

  • ChatGPT accountaccount/login/start

    The Codex child signs in through your browser and runs every turn on it, including turns sent from a phone. If the agent won’t start a turn, check this sign-in and its usage limits.

  • Claude accountclaude auth login --claudeai

    Claude runs its own browser sign-in and keeps the credential, and HB Code never reads it. You can add more accounts, each with its own sign-in. If a Claude turn won’t start, check this sign-in and its usage limits.

  • Personal API keyopenai_api_key · gemini_api_key

    Kept in the desktop keychain for desktop dictation and, with a Gemini key, the speech and video tools. Phone dictation doesn’t use it, so check it only when desktop dictation fails.

Codex sessions run on a ChatGPT sign-in. The desktop gets the sign-in address from the Codex child and opens it in your browser. The Codex child keeps the credential in the home folder of its profile. Claude sessions run on a Claude sign-in. The desktop runs Claude’s own command claude auth login --claudeai, and Claude opens the browser and keeps the credential. HB Code reads neither token. The default Claude account is the Claude sign-in that already exists on the computer.

Claude sign-in stepRule
Sign inOne sign-in runs at a time. A second start fails with “Claude sign-in is already running.” The desktop ends the command after 600 seconds.
CancelThe desktop stops the claude process. The account stays signed out.
Status and sign outclaude auth status --json and claude auth logout each have a limit of 15 seconds.
Remove an accountThe desktop deletes the folder of an added account. If that account was active, the default account becomes active. The default account cannot be removed.

Each added Claude account is a folder under claude/accounts in the HB Code application data, named with a UUID. Five entries stay private in that folder: .claude.json, .claude.json.lock, .credentials.json, backups, and statsig. Every other entry of the main Claude folder is a link, and the projects folder with the transcripts is always shared. The main folder is ~/.claude, or the folder in CLAUDE_CONFIG_DIR when that variable is set. So every account reads the same sessions and the same settings, and a switch changes only which account pays for the next run. A run keeps the account that was active when it started.

Agent sign-in at the first session

The desktop opens without an agent sign-in. The sign-in comes when you create a new session. If the chosen agent is signed out, a sign-in dialog for that agent opens, and the session starts after the sign-in. If you close the dialog, no session is created. A continued conversation opens without a sign-in.

Agent stateResult
The agent is signed inThe session starts at once.
Codex is signed outThe dialog asks for the ChatGPT sign-in, or for a choice of a ChatGPT account that is already on this computer.
Claude is signed outThe dialog asks for the Claude sign-in. The desktop keeps a confirmed Claude sign-in until a Claude account changes on this desktop.

The preselected agent is the value plantocode:new-session-agent:v1 in the local storage of the desktop window. Without a stored value the choice is Codex. An HB Code account is not part of this sign-in.

Limits, usage, and switching accounts

On the desktop, Settings → Agents shows both agents side by side. Each agent has its account rows, the limit meters of the active account, a usage detail view, and charts of usage over time. Claude reports a rolling five-hour window and weekly windows. Codex reports a primary and a secondary window. The desktop saves each fresh reading of the all-model windows and keeps it for 35 days.

Task from a phoneMethod
List the Codex profilessystem.codexAuthProfiles
List the Claude accountssystem.claudeAccounts. The result has the usage windows of each account.
Switch the Codex profilesystem.activateCodexAuthProfile with profileId
Switch the Claude accountsystem.activateClaudeAccount with accountId
Read the Codex limitssystem.codexUsageLimits, for the active profile
Read usage over timesystem.agentUsageHistory. For both agents it returns the readings of the weekly limit for the last 14 days. For Codex it also returns daily tokens.

The desktop stores the active Codex profile in the setting agent.chat.codex_profile_id and the active Claude account in agent.chat.claude_account_id. Without a Claude value the default account is active.

A phone can read and switch. It cannot add an account, sign in, sign out, or remove an account. Those actions exist only on the desktop.

One region per account

An HB Code account lives in one of two regions, United States or European Union, each with its own API host, relay process, PostgreSQL, and Redis. Device discovery is scoped to one account in one region, so both devices have to select the same one, and changing the region on a device signs it out first. The phones default to the United States when nothing is stored.

Remote access and the device list

  1. On the desktop, open Settings → Connections.
  2. In the Mobile Connection card, set Allow Remote Access to on.
  3. If the desktop asks for a server location, select the region of your HB Code account.
  4. If the desktop asks you to sign in, sign in with your HB Code account in the browser.
  5. Record the server location that the card shows.
  6. On the phone, select the same region.
  7. Sign in with the same HB Code account.
  8. Select your desktop in the device list.
  9. Select a project and a session.
A desktop in the list is not always one that answers
A desktop in the list is not always one that answersFour example desktops pass three checks from top to bottom. The device list shows every desktop with a device row in the account’s region, connected or not. A desktop answers only while the socket it opened to the relay is live. An awake desktop answers the phone’s ping, and the phone loads projects, sessions, and the timeline. A laptop with its lid closed stays listed as online until the relay drops its silent socket after about 3 minutes, then counts as reconnecting for 90 seconds, then as offline. A desktop whose remote-access switch was turned off stays in the list but goes offline at once. A desktop in another region or account is not in the list.
Studio PConline
awake, switch on
Laptoponline at first
asleep, lid closed
Office Macoffline
switch turned off
not in the list
other region or account
Device rowin this region
Desktop socketto the relay
Ping answeredthrough the relay
loads projects, sessions, and the timeline
3 min
90 s
silent, then reconnecting, then offline
no answer at first
then -32011, then -32010
row stays
closed at once, no grace
relay answers -32010
no row in this region
  • Device rowPOST /api/devices/register

    Created with X-Client-Type: desktop the first time remote access is on, in the region the desktop chose. Sleep and the switch leave it in place, so the desktop stays listed.

  • Desktop socket/ws/device-link

    The desktop dials out to the relay, and phones never connect to the computer directly. A silent socket is dropped after about 3 minutes and counts as reconnecting for 90 s, while turning the switch off closes it at once.

  • Pingsystem.ping

    The phone opens its own socket for this desktop and pings through the relay. Only an answer lets it load projects, sessions, and the timeline.

The WebSocket register’s device UUID must match the row’s owner and role. The switch needs a chosen server location and an HB Code sign-in. That sign-in exists only for remote access, and every other desktop feature works without an account. A degraded saved session pauses the mobile connection.

The connected preview and HB Code Pro

The first phone on an account to reach a desktop starts a 10-day connected preview for the whole account. After that each phone needs HB Code Pro, bought through the App Store or Google Play for its platform. The subscription covers the phone only. Coding on the desktop needs nothing beyond the agent’s own sign-in, and an iPhone subscription does not unlock Android or the other way round.

One preview period applies to the account, and you buy Pro for each phone platform
One preview period applies to the account, and you buy Pro for each phone platformAn example account with an iPhone and an Android phone. The iPhone gets the first answer from a desktop on day 0, and the regional server writes one preview record that ends 10 days later by the database clock. The Android phone first reaches a desktop on day 4 and gets the same record, so its preview also ends on day 10. After that the iPhone runs on an App Store subscription, which does not unlock the Android phone, and the Android phone needs its own Google Play subscription, bought here on day 12. The record stays expired and never starts again.
iPhone
Android phone
Preview recordregional server
preview
App Store Pro
same window
Google Play Pro
10 days · database clock
expired, never restarts
PUT /api/billing/workspace-preview
first desktop answer: record written
second phone: same record
ends for both phones
iPhone Pro does not unlock Android
day 0
day 4
day 10
day 12
example days
  • Preview recordaccount_workspace_previews

    Written the first time any phone on the account gets an answer from a desktop, with started_at from the database clock and expires_at 10 days later. Later phones get the same record, and the server can’t update or delete it.

  • Identity keysHMAC-SHA256

    The record is stored under keyed hashes of the Auth0 subject and the verified email, linked to each other. A lookup follows the links and takes the earliest start.

  • HB Code ProStoreKit · Google Play

    Bought per platform. The iPhone checks StoreKit on the device, and Android sends the purchase to the regional server to verify. Neither unlocks the other.

The server stores the preview under keyed hashes of the Auth0 subject and the verified email and counts the 10 days from database time.