> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llmeasy.ru/llms.txt
> Use this file to discover all available pages before exploring further.

# What should I do if Claude Desktop Cowork or Code mode fails with a Gateway?

> Fix Claude Desktop Cowork failures and Code mode errors after connecting LLMEasy as a Gateway.

After you configure the LLMEasy Gateway in Claude Desktop, the following symptoms usually do not mean the API Key itself is invalid:

* 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

These issues usually come from two separate causes: the desktop Gateway auth scheme does not match the Key group, or the bundled Claude Code version in Claude Desktop has not finished updating.

If you have not configured the Gateway yet, start with [Use LLMEasy API in Claude Desktop](/en/faq/claude-desktop-llmeasy-api).

## 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`

After you select the correct scheme, Claude Desktop automatically fetches the available models for that group. If the auth scheme is wrong, Cowork mode may fail Gateway authentication.

<Steps>
  <Step title="Open third-party inference settings">
    In the macOS menu bar, choose **Developer** → **Configure Third-Party Inference...**.
  </Step>

  <Step title="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**.
  </Step>

  <Step title="Save the config">
    Click **Apply locally** to save the local Gateway config.
  </Step>
</Steps>

Cowork mode usually works again after this change.

## 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**:

<Steps>
  <Step title="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.
  </Step>

  <Step title="Fully quit Claude Desktop">
    Use **Cmd+Q** to fully quit the app. Do not only close the window.
  </Step>

  <Step title="Reopen and start a new Code session">
    Open Claude Desktop again, then go to Code mode and start a new session.
  </Step>
</Steps>

<Note>
  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.
</Note>

## Quick reference

| Symptom                                                  | Common root cause                                         | Fix                                                                                                          |
| -------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Cowork mode does not work                                | **Gateway auth scheme** does not match the Key group      | Use `x-api-key` for a **Claude Key group** or `bearer` for a **GPT Key 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                     |
