After you configure the BetterToken Gateway in Claude Desktop, the following symptoms usually do not mean the API Key itself is invalid:Documentation Index
Fetch the complete documentation index at: https://docs.bettertoken.ai/llms.txt
Use this file to discover all available pages before exploring further.
- Cowork mode does not work
- Code mode shows
Claude Code process exited with code 1 - The same API Key works in Claude Code CLI from a terminal
Fix Cowork mode first
Root cause: Gateway auth scheme does not match the API Key group. In Claude Desktop Gateway settings, choose the auth scheme based on the API Key group:- If the API Key belongs to a Claude group, set Gateway auth scheme to
x-api-key - If the API Key belongs to a Codex group, set Gateway auth scheme to
bearer
Open third-party inference settings
In the macOS menu bar, choose Developer → Configure Third-Party Inference….
Change the auth scheme
Choose Gateway auth scheme based on the API Key group: use
x-api-key for a Claude group and bearer for a Codex group.Then fix Code mode exit errors
If Cowork works but Code mode, the</> tab, still shows Claude Code process exited with code 1, check whether Claude Desktop is still using an older bundled Claude Code version.
Root cause: Claude Desktop may be downloading a newer Claude Code version in the background. Before the download finishes, Code mode can fall back to an older installed Claude Code version. That older version may not be compatible with third-party Gateway usage in Code mode, so the process exits immediately.
How to fix it:
Wait for the newer Claude Code version to finish downloading
Keep Claude Desktop open for a while so the background Claude Code update can complete.
If logs show Claude Desktop falling back to an older Claude Code version, such as
2.1.111, while a newer version, such as 2.1.119, is not ready yet, wait for the newer version to finish downloading and then restart the app.Quick reference
| Symptom | Common root cause | Fix |
|---|---|---|
| Cowork mode does not work | Gateway auth scheme does not match the API Key group | Use x-api-key for a Claude group or bearer for a Codex group, then click Apply locally |
Code mode shows Claude Code process exited with code 1 | Claude Desktop falls back to an older Claude Code version | Wait for the newer version to finish downloading, fully quit with Cmd+Q, then reopen |