# Claude Code mode

> Run your Claude threads through Claude Code on your Claude plan. How and where it runs, how to set it up, its statuses and moving from the Claude sign-in.

Source: https://docs.langalpha.ai/concepts/claude-code/

**Claude Code mode** runs Anthropic's Claude Code through the Claude Agent SDK, inside LangAlpha's harness and tools. The agent still works in your workspace with its files, data tools and the rest, and usage counts against your Claude plan.

## How it differs from the other sign-ins

With the other sign-ins, Claude included, LangAlpha calls the provider with your plan. Claude Code mode runs the Claude Code program itself, with LangAlpha's tools plugged in. So:

- **It needs a computer it can run on.** That is a computer of yours, or a Medium or larger cloud computer where the server offers it. See [Where it runs, and when it can run](#where-it-runs-and-when-it-can-run).
- **Claude Code keeps its own context.** It keeps the conversation and compacts it itself.
- **It signs in with a setup token made for LangAlpha.** The token is separate from your own Claude Code sign-in, and it never touches that sign-in.

## How it runs

In Claude Code mode, Claude Code itself calls Claude, from a computer of yours or from your cloud computer. On the hosted app, no turn runs Claude Code on LangAlpha's servers.

**On a computer of yours, it runs like your own Claude Code.** LangAlpha installs Anthropic's own Claude Code release on your Mac or SSH computer and starts it there over the computer's connection to LangAlpha. LangAlpha drives it through the Claude Agent SDK, which runs Claude Code without its interactive screen. Claude Code sends its requests to Anthropic from your computer, as it does when you run it yourself. It signs in with the setup token kept on that computer. LangAlpha passes the token to the computer once, when you add it, and keeps no copy.

**On a cloud computer, it is Claude Code on a cloud machine.** If you choose to run it on cloud computers, Claude Code runs inside your cloud computer, as it would on a server you rent, and sends its requests to Anthropic from there. For this, LangAlpha stores your setup token encrypted and hands it to Claude Code as each turn starts. The token never goes into a command line, an environment variable or a file on the cloud computer. LangAlpha's servers run Claude Code with the stored token only to check the token with Claude. They do that when you add it, when you choose Check now, and when Settings or the model picker shows its status and the last check is more than an hour old. Each check is one short request. With this choice, a computer of yours that has no token of its own signs in with the stored token too.

**What still goes through LangAlpha.** Claude Code gets LangAlpha's tools by asking LangAlpha for them. Each tool call goes to LangAlpha, which runs the tool and sends the result back. That is one round trip per call. Commands and files still run on the workspace's computer, as in any thread. Claude Code's messages also pass through LangAlpha on their way to you, and LangAlpha saves the conversation with the thread, as it does for every thread.

## Where it runs, and when it can run

Claude Code runs on one of these computers, and only while that computer is up:

| Where | It can run while |
|---|---|
| Your Mac, with [Remote control](https://docs.langalpha.ai/concepts/sandboxes-and-ssh/#remote-control-of-your-mac) | Remote control is on, and the Mac is awake and online. |
| A Mac or Linux computer [over SSH](https://docs.langalpha.ai/concepts/sandboxes-and-ssh/#bringing-your-own-machine-over-ssh) | LangAlpha can reach it. |
| A Medium or larger cloud computer, where the server offers it | The cloud computer is running. A message you send starts a stopped one, as in any thread. |

A workspace on a computer of yours runs Claude Code on that computer. On the hosted app, a workspace on a cloud computer runs it on a computer of yours that has its own setup token, and the workspace's files and commands stay on the cloud computer. Where the server offers it, you can run it on cloud computers instead. In Claude Code's view, choose **On cloud computers, with your setup token stored by LangAlpha**, and Claude Code runs on the cloud computer itself.

When the computer that would run Claude Code is not up, the turn does not start, and LangAlpha does not move it to another model. The message says why, for example:

- "Office Mac, where Claude Code runs for you, is offline. Turn it on, or pick another model."
- "Claude Code runs on your own computers, and none of yours with its own setup token is online now. Turn one on, or add a token for one in Settings under Model access."

The model picker gives the same reason beside Claude Code's models, and the Claude Code row in Settings shows Offline or No computer. A workspace on a computer of yours that is offline runs no turn at all until that computer is back.

:::note[Hosted and self-hosted]
**Self-hosted:** On a self-hosted server, a workspace on a cloud computer runs Claude Code on the server itself, with a setup token you add in Settings, or inside the cloud computer where the server is set up for that. There is no choice to make in Claude Code's view. On the server, Claude Code runs while the server runs, and the server runs your turns with that token. So in [How it runs](#how-it-runs), the server takes the cloud computer's place.
:::

## Requirements

A computer of yours that runs Claude Code also needs:

- **perl.** LangAlpha starts Claude Code through it.
- **On Linux, a distribution that is not musl.** Alpine Linux, for example, is not supported yet.
- **No organization Claude Code policy.** If managed Claude Code settings are installed on the computer, LangAlpha does not run Claude Code there.

A cloud computer that runs Claude Code itself must be Medium or larger.

## Set it up

1. Open Settings, then Models, then Model access.
2. Choose Connect a subscription, then Claude Code. Its view shows what is missing: a computer, a setup token, or both.
3. Add a setup token for each computer of yours, or, to run Claude Code on cloud computers, one setup token LangAlpha stores for you. Pick one way:
   - **Sign in with Claude.** Approve the sign-in in the new tab, then paste the code Claude shows. LangAlpha makes the token for you, so there is nothing to run.
   - **Paste a token.** Run `claude setup-token` in a terminal on any computer, sign in to Claude in the browser window it opens, and paste the token it prints. A long token can wrap onto a second line, so copy all of it.

LangAlpha checks a token with Claude before it keeps it. If Claude Code mode is still off for your account, adding the first token turns it on. On the hosted app, it is on for every account.

A token lasts up to a year. The view says when it expires, and asks for a new one in the two weeks before.

## What each status means

The Claude Code row shows one of these words. In its view, each computer has a line of its own that says the same for that computer.

| Status | What it means | What to do |
|---|---|---|
| No computer | No computer that can run Claude Code is connected. | Connect your Mac with Remote control, or add an SSH computer. |
| Offline | The computer is asleep or cannot be reached. | Open LangAlpha on the Mac and check that Remote control is on. For an SSH computer, check that it is on and reachable. |
| Unavailable | Claude Code cannot run on that computer: perl is missing, it runs musl, or an organization Claude Code policy is installed. | Install perl, use a Mac or a Linux that is not musl, or use a computer without the policy. |
| Not connected | The computer has no setup token yet. | Add a setup token. |
| Checking | LangAlpha is asking Claude whether the token works. | Wait for the answer. |
| Needs sign-in | Claude refused the token, or it expired. | Add a new setup token. |
| Connected | Claude Code is ready on that computer. | Nothing. |

## What runs on another model

Claude Code runs a workspace's Analyst, its subagents and your [Chief of Staff](https://docs.langalpha.ai/concepts/chief-of-staff-and-analysts/) on your Claude plan whenever they use a Claude Code model. A subagent set to another model runs on that model. On the hosted app, you choose where it runs: on your own computers, for every workspace, including those on cloud computers, or on Medium or larger cloud computers with a setup token LangAlpha stores for you. Background work such as thread titles and reading web pages still runs on another model, so keep one connected for it.

A thread that another model has already answered cannot switch to a Claude Code model. Start a new thread to use one.

## Usage

With a setup token, usage counts against your Claude plan. When your Claude plan reaches its limit, the turn stops and tells you.

Usage counts against your Claude plan, including automations, wakeups and turns another agent sends.

## Turn it off

If Claude Code's view has Turn off Claude Code at the bottom, choose it. Its models leave the model picker. Setup tokens on your computers stay until you remove them there.

On the hosted app, Claude Code mode is on for every account, so its view has no Turn off. To stop using it, pick another model. To remove a setup token, use that token's row in Claude Code's view.

## Moving from the Claude sign-in

On the hosted app, signing in with Claude ends on November 30, 2026. Claude Code mode replaces it.

:::note[Hosted and self-hosted]
**Self-hosted:** The date and the steps below are for the hosted app. A self-hosted server keeps the Claude sign-in until its operator ends it.
:::

### What is changing?

The Claude row under Connect a subscription goes away. Claude Code mode takes its place. It runs Claude Code itself with LangAlpha's tools, and it is the way we recommend to use your Claude plan in LangAlpha. See [How it runs](#how-it-runs).

### What do I need to do?

1. Set up Claude Code mode. See [Set it up](#set-it-up).
2. Open Settings, then Models, then Default models, and pick a Claude Code model as your default model.
3. Move your automations and subagents to a Claude Code model, as described below.

### What happens to my existing threads?

A thread that another model has answered, a model from the Claude sign-in included, cannot switch to a Claude Code model. To keep such a thread going after November 30, switch it to a model that is not a Claude Code model. To continue on Claude Code, start a new thread.

### What about my automations and subagents?

Each automation and subagent set to a model from the Claude sign-in keeps that model. Open each one and pick a Claude Code model. After November 30, an automation still on the old model fails each time it runs, until it switches itself off. [Automations](https://docs.langalpha.ai/concepts/automations-wakeups-commands/) says when that happens.

### What happens on November 30?

The Claude sign-in stops working. Turns on its models are refused until you pick another model. Your Claude Code setup tokens are separate and keep working.

### Can I still use the Claude sign-in until then?

Yes. If you already signed in with Claude, it keeps working until November 30, 2026, and you can sign in again if it lapses. If you never signed in with Claude, the Claude row is no longer offered.

### What runs my background work?

Background work, such as thread titles and reading web pages, cannot run on Claude Code. Keep another model connected for it. If your background model is a model from the Claude sign-in, pick another one before November 30.

## Related

- [Models and your own keys](https://docs.langalpha.ai/concepts/models-and-keys/)
- [Computers](https://docs.langalpha.ai/concepts/computers/)
- [Sandboxes and SSH computers](https://docs.langalpha.ai/concepts/sandboxes-and-ssh/)
- [Threads and turns](https://docs.langalpha.ai/concepts/threads-and-turns/)
- [Automations, wakeups and background commands](https://docs.langalpha.ai/concepts/automations-wakeups-commands/)
