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

# Claude Code

> The go-to coding agent for many developers

## Overview

Claude Code is powered by Anthropic's Claude models and is the go-to coding agent for many developers. It offers excellent performance across a wide range of tasks.

> [!NOTE]
>
> Claude Code can also run **GLM 5.3** (`z-ai/glm-5.3`) when its authentication method is set to **Blocks**, paid from your Blocks LLM credits.

## Latest Models

* **Claude Opus 5** - Most capable model with enhanced reasoning
* **Claude Sonnet 5** - Latest high-performance model
* **Claude Fable 5.1** - Fast model for everyday coding work
* **Claude Opus 4.8** - Previous flagship, still available
* **Claude Sonnet 4.6** - Balanced speed and capability
* **Claude Haiku 4.5** - Fastest model for lightweight tasks
* **GLM 5.3** - `z-ai/glm-5.3`, available only with the Blocks authentication method

## Authentication

Claude Code supports four authentication methods:

> [tab] Anthropic API Key
>
> **Pay-as-you-go API access**
>
> 1. Get an API key at [Anthropic Console](https://console.anthropic.com/)
> 2. In [Blocks Dashboard](https://blocks.team), go to **Dashboard** → **Agents**
> 3. Select **Claude Code** and choose "API Key"
> 4. Paste your API key (starts with `sk-ant-`)

> [tab] Anthropic Subscription
>
> **Connect your Claude Pro/Team subscription**
>
> 1. Run `claude setup-token` in your terminal
> 2. Copy the `sk-ant-oat01-…` token it prints
> 3. In [Blocks Dashboard](https://blocks.team), go to **Settings** → **Agents** → **Claude Code** → **Authentication** and set the authentication method to **Subscription**
> 4. Paste the token and save
>
> This uses your subscription instead of pay-as-you-go billing. You can connect more than one — see [Multiple Subscriptions](#multiple-subscriptions) below.
>
> To connect a subscription for just your own account rather than the whole workspace, use **Settings** → **Agents** → **Claude Code** → **Authentication** → **Personal** instead.

> [tab] AWS Bedrock
>
> **Enterprise AWS Bedrock access**
>
> 1. Set up Claude models in AWS Bedrock
> 2. Generate Bedrock API credentials
> 3. In Blocks Dashboard → **Dashboard** → **Agents** → **Claude Code**
> 4. Select "AWS Bedrock" and enter your credentials

> [tab] Blocks
>
> **Run on Blocks LLM credits**
>
> 1. In [Blocks Dashboard](https://blocks.team), go to **Settings** → **Agents** → **Claude Code**
> 2. Set **Authentication Method** to "Blocks"
>
> There is no API key to set. Requests route through the Blocks AI Gateway and usage draws on your Blocks LLM credits. Every model listed above is available under Blocks, including GLM 5.3.

### Multiple Subscriptions

A workspace can hold up to 10 Anthropic subscriptions. Add them under **Settings** → **Agents** → **Claude Code** → **Authentication** → **Workspace** → **Add subscription**. Each one is named when you connect it so you can tell them apart in the list. The name cannot be changed afterwards.

For each session, Blocks picks the subscription with the lowest usage, so work spreads across them instead of exhausting one.

Your own subscription under **Settings** → **Agents** → **Claude Code** → **Authentication** → **Personal** is still a single connection, and it is included in the same selection:

* Sessions you start from the Blocks dashboard use your personal subscription
* Sessions started from GitHub, Slack, Linear, and other external tools use it too, as long as you have [linked that account](https://docs.blocks.team/using-blocks/workspaces/linked-accounts)
* If an external account cannot be matched to a Blocks user, the session uses the workspace subscriptions
* If your personal subscription runs out of usage, the session falls back to the workspace subscriptions

### Migrating to the New Anthropic Subscription Flow

The browser-based "Connect Subscription" authorization has been replaced by a setup token. The old flow tended to stop working after a while, leaving the connection stuck on authentication errors until you reconnected; the new one stays stable. Existing connections keep working, so there is nothing to do right away, but re-link yours when convenient:

1. Run `claude setup-token` in your terminal
2. Go to **Settings** → **Agents** → **Claude Code** → **Authentication** and click **Add subscription**
3. Paste the `sk-ant-oat01-…` token and save
4. Once the new subscription is listed, disconnect the old one from its menu

If you also connected an Anthropic subscription at the user level, go to **Settings** → **Agents** → **Claude Code** → **Authentication** → **Personal**, disconnect the existing connection, then paste a fresh setup token.

> [!NOTE]
>
> User subscriptions are a single connection, so there you have to disconnect first — the token field only appears once the existing connection is removed. Workspace subscriptions no longer work this way.

Setup tokens do not expire, so the periodic re-authorization the old flow needed every 8 hours is gone.

## Setting as Default

To use Claude Code automatically for all requests:

1. Go to **Dashboard** → **Agents**
2. Select "Set as default agent" from Claude Code's dropdown menu

## Using Claude Code

Once configured, Claude Code is used automatically if it's your default agent:

```
@blocks can you review this code?
```

Or use the `/claude` slash command to use it specifically:

```
@blocks /claude review this PR for security issues
```

## Best For

* Code reviews and analysis
* Complex problem solving
* Architecture planning
* Security analysis
* Detailed explanations
* Refactoring

## Cost

Claude Code uses your Anthropic API key or subscription:

* Check pricing at [Anthropic Pricing](https://www.anthropic.com/pricing)
* Monitor usage in [Anthropic Console](https://console.anthropic.com/)
* API usage is billed by Anthropic based on tokens

With the **Blocks** authentication method there is no Anthropic bill. Requests route through the Blocks AI Gateway and are billed against your Blocks LLM credits.

## Next Steps

> [card] [Codex Agent](https://docs.blocks.team/using-blocks/agents/codex.md)
>
> Learn about Codex

> [card] [Gemini CLI](https://docs.blocks.team/using-blocks/agents/gemini-cli.md)
>
> Explore Gemini CLI (experimental)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.