- 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 Key group. In Claude Desktop Gateway settings, choose the auth scheme based on the Key group:- If the API Key belongs to a Claude Key group, set Gateway auth scheme to
x-api-key - If the API Key belongs to a GPT Key group, set Gateway auth scheme to
bearer
1
Open third-party inference settings
In the macOS menu bar, choose Developer → Configure Third-Party Inference….
2
Change the auth scheme
Choose Gateway auth scheme based on the Key group: use
x-api-key for a Claude Key group and bearer for a GPT Key group.3
Save the config
Click Apply locally to save the local Gateway config.
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:
1
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.
2
Fully quit Claude Desktop
Use Cmd+Q to fully quit the app. Do not only close the window.
3
Reopen and start a new Code session
Open Claude Desktop again, then go to Code mode and start a new session.
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.