Connect Codex and Claude
On this page
boxes.dev runs Codex and Claude Code on your devboxes with your own agent accounts. Sign in with ChatGPT to connect Codex, or with Claude to connect Claude Code; either agent can also use an API key. You'll need at least one connected agent to start an agent task, and you can connect both to choose between them for different tasks.
Connect an account
- In the desktop app's sidebar, open Settings → Configure agents…. On macOS, you can also choose boxes.dev → Configure agents… in the app menu.
- Choose Add beside the agent. For Codex, choose Log in with ChatGPT; for Claude Code, choose Log in with Claude. Either agent also offers API key.
- Complete the browser sign-in. For an API key, enter the key and choose Save.
- If you've saved more than one account or key, select the radio control next to the one you want to use. A new API key won't replace a working subscription that the agent is already using, so select the key if you want to switch to it.
Your Codex and Claude selections are independent, so each agent can use a different account. Agent subscription limits and API charges come from the connected provider, separately from boxes.dev machine usage.
Use your claude.ai skills, plugins, and connectors
When you choose Log in with Claude, boxes.dev will save a claude.ai login, the same kind of sign-in Claude Code uses on your own computer. Claude on your devboxes will then have your claude.ai features: the skills and plugins you use on claude.ai, connectors you've added there, such as Gmail, and fast mode. Its row in Configure agents… says claude.ai login.
A Claude account you connected before this was available says Setup token. It keeps working, but without those claude.ai features or fast mode. To switch it, open the account's ⋯ menu, choose Switch to claude.ai login, and sign in with the same Claude account. boxes.dev will update that saved account to a claude.ai login. If an older account appears as a second row afterward, remove the Setup token row. If the menu shows only Re-authenticate, update the desktop app first; older versions can only save setup tokens. You can also switch from the mobile app.
Claude asks for a new sign-in about every four weeks. Three days before that, the account's row will show Sign in again by a date, and the mobile app will show a reminder banner. Choose Re-authenticate from the row's ⋯ menu, or tap Reconnect on your phone, to keep Claude working without a break.
Allow claude.ai connectors appears under your Claude accounts once you've saved a claude.ai login, and it's on by default. Clear it if you don't want agents on your devboxes to use your claude.ai connectors. The change will apply to new Claude sessions, including automation runs that use your account; your claude.ai skills and plugins will still load.
Change the account an agent uses
Open Configure agents… and select the radio control beside another saved account or API key. Your new selection will apply across your devboxes, but a thread whose agent is already running may keep using the account it started with and may show that account's usage limits.
Use a saved account's ⋯ menu to Re-authenticate (or Switch to claude.ai login for an older Claude account), or a key's menu to Edit API key. Remove will delete that saved credential. If you remove the active one, boxes.dev will select another usable saved credential when one is available; otherwise, the agent will be disconnected. The confirmation will show which outcome to expect before you remove it.
Check how much usage each account has left
In Configure agents…, each saved subscription has a small bar showing how much of its weekly limit is left. A second bar for the 5-hour limit appears only when that limit is running low. Hover over the bars to see exact amounts and reset times. boxes.dev refreshes these readings when you open Configure agents…; if a reading is more than 15 minutes old, the details will show when it was last updated. Each saved API key shows when it was last used and how many tokens it has used today, including cached tokens.
In a thread, hover over the usage indicator in the message box to see which account its limits belong to. When the agent is using an API key, the indicator shows a key icon instead, and hovering over it shows today's token usage for that key.
Switch automatically when subscription usage runs out
In Configure agents…, add your subscription accounts for Codex or Claude Code, then select Automatically rotate subscriptions when usage depleted. This option appears once you've saved more than one subscription for that agent. Choose the default with the radio control beside an account. boxes.dev will use that account whenever it has usage available, switch to another when its usage runs out, and return to the default after its limits reset. Before returning to a Codex default, boxes.dev will check its current usage, because an account you also use elsewhere may have run out again. Active identifies the account currently in use, which can differ from Default.
If you've also saved an API key, you can select Automatically switch to API when all subscriptions are exhausted. API usage will be billed separately by the API provider. This choice is off until you enable it; unknown usage or a sign-in failure alone won't switch you to API billing. Selecting an API key directly will turn automatic selection off for that agent. If you turn on either option while an API key is selected, boxes.dev will move the agent back to a subscription unless every subscription has run out and API switching is on.
Both settings apply across your devboxes and to existing conversations. An account switch keeps the conversation's history. If a Codex turn is running when the account switches, it will stop, and boxes.dev will continue it on the new account a few seconds later. If that account is out of usage too, the turn will continue on the next account boxes.dev switches to within a minute. A Codex turn that stopped at a usage limit before the switch still needs a follow-up. When Claude hits a usage limit and another account is selected automatically, boxes.dev resumes the same conversation and continues the unfinished request before queued follow-ups. Stop cancels that recovery. If no account is available, or the turn has background work or pending steering that cannot be safely resumed, the turn stays stopped; continue it when usage is available.
Connect or reconnect from your phone
You can also manage these accounts from the mobile app. Open Settings → Agent accounts, then tap Add beside an agent, or tap a saved account to use it, re-authenticate it, check it, or remove it. The Allow claude.ai connectors switch is below your Claude accounts.
- Codex: tap Log in with ChatGPT, then Open ChatGPT. The app will copy the one-time code it shows. Sign in to ChatGPT if asked, paste the code, and approve. Codex will connect once you approve, even if you approve in another browser.
- Claude Code: tap Log in with Claude, then Open Claude and approve access. Copy the code Claude shows, return to the app, paste it, and tap Continue.
Connect while setting up a project
When your local coding agent sets up a project (Set up a project with your local agent), it will open Connect your accounts in your browser. Choose Connect beside Codex or Claude Code and finish signing in, or choose Use an API key. Then choose Done to return to your agent. Accounts you connect there are the same ones you'll see in Configure agents.
If an agent already shows as connected to boxes.dev, choose Done to continue setup with that account. You don't need to sign in again.
Repair a connection
If you're starting a thread with an agent that isn't connected, boxes.dev blocks sending and shows Set up Codex or Set up Claude. Select that action to open Configure agents, connect the agent, then come back and send your prompt. For an expired sign-in, reconnect the account or select another saved credential before retrying.
In the mobile app, a banner shows at the top of the screen when the account an agent uses needs you to sign in again, or will soon. Tap Reconnect to sign in, or open Settings → Agent accounts to choose another saved account.
Some tools an agent uses have their own sign-ins, separate from the agent account. If the agent can respond but one of its tools needs a sign-in, repair that connection under MCPs or agent plugins.