A2X← Back to A2XWorkshop resource
Claude Code · Field Lesson

Local Cloud

Six places Claude Code can run. Three commands that move work between them. One pricing trap that quietly bills you. Here's the whole map — and the moves you'll actually use.

A self-paced lesson · current as of MAY 2026
HEADS UP → Two of the surfaces in this lesson — Claude Code on the web and Remote Control — are still in research preview. Commands, limits, and behavior can change. Verify against code.claude.com/docs before betting a workflow on them.

The mental model

Surfaces hold the work. Primitives move it.

Stop thinking "local vs. online" as a binary. Think of it as six surfaces where a session can live, connected by three primitives that carry a session from one to another. Learn the six, then learn the three, and every workflow in this lesson is just a path through the map.

The six surfaces

Local

CLI

The claude terminal. Your filesystem, your env, your MCP servers. The origin of most sessions.

Local

IDE extension

VS Code / JetBrains. Same engine as the CLI, wrapped in your editor.

Local

Desktop app

The only surface that can push a running session up to the cloud, via "Continue in".

Cloud

Web — claude.ai/code

A fresh Anthropic-managed VM. Clones your repo from GitHub. Runs in parallel while your laptop is free.

Cloud

Mobile app

iOS + Android Code tab. Triage, steer, approve, open a PR from your phone.

Cloud

GitHub Actions / Routines

Unattended runs on a schedule, a webhook, or a PR event — no human at the keyboard.

The three primitives

push →

--remote

Spins up a fresh cloud VM and hands it a task. The work leaves your machine entirely.

← pull

--teleport

Pulls a cloud session back into your terminal to finish it interactively.

mirror ⇄

/remote-control

Keeps execution local but mirrors the live session onto your phone or browser through a relay.

The one asymmetry to memorize: from the CLI, you can only pull cloud→local. The only way to push a still-running local session up to the cloud is the Desktop app's "Continue in" menu. If you might switch devices mid-task, the safe move is to start cloud-first.

Interactive · 01

The transition picker

Pick where your work is and where you want it to go. The exact mechanic appears below — including the prerequisite that bites people.

From → To
Where is the work, and where should it go?

Choose a "from" and a "to" to see the move.


Interactive · 02

Which automation layer?

"Run it for me" has four different answers in Claude Code, and people pick the wrong one constantly. Two questions settle it.

Decision
Answer two questions
1 · Must it survive your laptop being closed / asleep?
2 · How is it triggered?

Pick one from each row.


Interactive · 03

Who's paying? The auth resolver

Claude Code checks credentials in a fixed priority order. The trap: a forgotten ANTHROPIC_API_KEY in your shell profile silently bills you per token even with an active Max subscription. Toggle what's present in your environment and watch which one actually wins.

Resolver
Toggle the credentials present in your environment

Priority (top wins): cloud-provider creds → ANTHROPIC_AUTH_TOKEN → ANTHROPIC_API_KEY → apiKeyHelper → CLAUDE_CODE_OAUTH_TOKEN → /login subscription

The reliable habit: run /status after changing environments — it's the only way to see which route is truly active. To force the subscription route, unset ANTHROPIC_API_KEY.


Reference

Moving only the model

Enterprise routing is its own kind of "local ⇄ cloud": the agent stays in your terminal, but the model calls get routed to your cloud of record. One env var flips each backend.

AWS

Bedrock

CLAUDE_CODE_USE_BEDROCK=1 + AWS creds. Wizard: /setup-bedrock. If you hit beta-header 400s, set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1.

Google Cloud

Vertex AI

CLAUDE_CODE_USE_VERTEX=1 + ADC login. Wizard: /setup-vertex. Watch quota (429 RESOURCE_EXHAUSTED) and VPC-SC blocking web search.

Microsoft

Foundry

CLAUDE_CODE_USE_FOUNDRY=1 + resource name or base URL (mutually exclusive). No wizard — env vars only.

Any

LLM Gateway

ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN. Gateway must speak the Messages API and forward anthropic-beta / anthropic-version headers.

No offline mode. Anthropic ships no first-party local-weights option. The claude CLI speaks only the Anthropic Messages API, so pointing it straight at Ollama fails — open-weight backends (Qwen, DeepSeek, Llama) need a translation proxy (Claude Code Router, LiteLLM), and tool-use parity is incomplete. Treat it as advanced/optional, not a starting point.

Self-check

Did it land?

Four questions. Click an answer; the reasoning reveals itself.


The five moves

If you remember nothing else

Send up

Push a task to the cloud

claude --remote "…" — needs a GitHub-connected repo; push your commits first.

Bring back

Pull a cloud task home

claude --teleport — needs clean Git state in the right checkout.

Watch

Drive it from your phone

/remote-control + Claude mobile app — your laptop must stay on.

Unattended

Run without your laptop

Cloud Routine — runs with no permission prompts, so write a self-contained prompt.

The fifth move is routing the model through Bedrock / Vertex / Foundry / a gateway — set the env var, then /status to confirm who's paying.