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

# Claude Code CLI Troubleshooting

> Fix common Claude Code CLI errors including authentication failures, SSL certificate issues, and connection problems

This guide covers common errors when using Claude Code CLI through Unbound. For initial setup, see the [Claude Code Integration guide](/integrations/claude-code-integration).

## "No api\_key found in callback. Exiting."

The authentication flow didn't complete properly.

**How to fix:**

<Steps>
  <Step title="Run the setup command again">
    Re-run the Unbound CLI setup for Claude Code.
  </Step>

  <Step title="Complete the browser step fully">
    Don't close the browser tab early. Wait for the success page.
  </Step>

  <Step title="Check pop-up blockers">
    Ensure pop-ups are not blocked in your browser.
  </Step>

  <Step title="Try a different browser">
    Some SSO providers have issues with specific browsers.
  </Step>

  <Step title="Use manual setup as fallback">
    If the issue persists, set environment variables manually:

    ```bash theme={null}
    export ANTHROPIC_API_KEY="your-unbound-api-key"
    export ANTHROPIC_BASE_URL="https://api.getunbound.ai"
    ```
  </Step>
</Steps>

## "API Key Verification Failed" / "Fetch Failed"

This usually indicates a network or configuration issue.

**Common causes and fixes:**

* **Check your network connection** — ensure you can reach `api.getunbound.ai`
* **Corporate proxy** — if behind a corporate proxy, configure proxy settings in your terminal
* **Verify environment variables are set correctly:**
  ```bash theme={null}
  echo $ANTHROPIC_API_KEY
  echo $ANTHROPIC_BASE_URL
  ```
  Both should return values. If empty, your shell profile didn't load them — re-add them and run `source ~/.zshrc`.

## "Self-Signed Certificate Detected"

This occurs when your corporate network uses SSL inspection or interception.

**Fix:** Add your corporate CA certificate to Node.js:

```bash theme={null}
export NODE_EXTRA_CA_CERTS="/path/to/your/corporate-ca.pem"
```

Add this to your shell profile (`~/.bashrc`, `~/.zshrc`, or PowerShell profile). Contact your IT team for the correct certificate file path.

## "Claude Code Not Found" After Installation

<Steps>
  <Step title="Check your PATH">
    Verify npm global bin is in your PATH:

    ```bash theme={null}
    npm config get prefix
    ```
  </Step>

  <Step title="Add to PATH if missing">
    Add the npm global bin directory to your PATH in your shell profile.
  </Step>

  <Step title="Avoid sudo with npm">
    If you installed with `sudo`, uninstall and reinstall using:

    ```bash theme={null}
    npm config set prefix ~/.npm-global
    ```
  </Step>

  <Step title="Restart your terminal">
    After updating your PATH, restart your terminal completely.
  </Step>
</Steps>

## Node.js/npm Version Issues

If you updated Node.js or npm and Claude Code stopped working:

1. Reinstall Claude Code:
   ```bash theme={null}
   npm install -g @anthropic-ai/claude-code
   ```
2. Verify the installation:
   ```bash theme={null}
   which claude
   ```
3. If using `nvm`, make sure the correct Node.js version is active

## Token Limit Exceeded Errors

If you see "Claude's response exceeded the output token maximum", set the environment variable to increase the limit:

```bash theme={null}
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
```

Add to your shell profile and restart your terminal.

See [Model & Token Errors](/support/troubleshooting/model-and-token-errors) for more details.

## Still Having Issues?

See [API Key Troubleshooting](/support/api-keys/troubleshooting-api-keys) for invalid key and authentication errors.
