AnswerQA

Should I use Claude Code on the web or in my terminal?

Answer

The web runs in an Anthropic-managed cloud VM cloned from your GitHub repo; the CLI runs on your laptop with full local access. Use the web for clean-VM tasks (CI fixes, code review, fresh-repo questions) and the CLI for anything that needs your local environment, secrets, or sibling repos.

By Kalle Lamminpää Verified May 7, 2026

Two surfaces, one tool: Claude Code on the web runs in an Anthropic-managed VM that clones your GitHub repo on every task, while the CLI runs on your laptop with everything your shell has access to. The cloud is for clean-room work; the CLI is for anything that needs your local state.

Feature matrix

Web (claude.ai/code)CLI (claude in terminal)
Where it runsAnthropic-managed VM, fresh per sessionYour laptop
Repo accessCloned from GitHub on every sessionYour local working copy
Available filesAnything committed to the repoAnything on your filesystem
~/.claude/CLAUDE.mdNot loaded (user-scoped)Loaded
~/.claude/settings.jsonNot loadedLoaded
<repo>/CLAUDE.md, <repo>/.claude/, .mcp.jsonYes (part of the clone)Yes
User-installed pluginsNot loadedLoaded
Local environment variablesSet via setup script onlyInherited from your shell
Sibling repos / local-only filesInaccessibleAccessible
Auto-fix PRsYes (with GitHub App)No
Session sharingBuilt-in share linksNone
GitHub authGitHub App (per-repo) or /web-setupWhatever your local gh is logged into

Use the web when

  • You want a clean VM. CI failures, “does this branch still build?”, running a test suite from a fresh clone. The cloud session has no cached state from your laptop.
  • You want shareable sessions. A bug you reproduced, a refactor proposal, an investigation a teammate needs to take over. Web sessions have share links; CLI sessions are local-only.
  • Auto-fix on PRs is the workflow. The GitHub App listens for PR webhooks and runs auto-fix in the cloud; this is web-only.
  • You are on a Chromebook, an iPad, or a borrowed laptop. The CLI is not installed; the web works in a browser.
  • The task is about a repo other than the one in your current cwd. You can launch a web session against any connected repo without changing local directories.

Use the CLI when

  • The task needs files that are not in the repo. Your .env, your sibling repo at ../other-project/, that one-off script in ~/scratch/. The cloud session does not see them.
  • You depend on user-scoped config. Your ~/.claude/CLAUDE.md does not load in cloud sessions. If your daily-driver rules live in user scope, the cloud session is missing them by default.
  • Latency matters. The CLI runs locally; the cloud round-trips to Anthropic’s infra. For “fix this typo” turnaround, the CLI is faster.
  • The MCP servers you depend on run locally. Your local Postgres MCP server, your local Linear bridge, your local file-watcher MCP: only the CLI can reach them. Cloud sessions reach only MCP servers configured in the cloud environment.
  • You want the diff in your editor. The CLI hands diffs to your terminal where your editor and tools live. For code-review-shaped work, the local environment usually beats the web panel.

Move sessions between surfaces

claude --remote "Fix the failing CI on the auth tests"

Starts a new cloud session from your terminal; the work runs in the cloud and you watch progress in the terminal output. --remote can bundle a local repo into the cloud session when GitHub access is unavailable, useful for repos you have not connected to your Claude Code on the web account.

Inside a cloud session, the Teleport action hands the work to your terminal: the local CLI fetches and checks out the branch the cloud session was working on, loads the conversation history, and you continue locally. The web session is paused while the local CLI works; you can return to the cloud later with the conversation intact. Teleport works whether or not the cloud session was originally started from a CLI.

Footguns

Cloud sessions do not see user-level config. A team where every developer has personalized ~/.claude/CLAUDE.md rules will see those rules ignored on the web. Move shared rules into project-level <repo>/CLAUDE.md (committed) so the cloud session inherits them. Personal preferences stay in user scope; team rules belong in the repo regardless.

/web-setup syncs your gh CLI token to Anthropic. That is exactly what makes it work, but it is also an additional secret leaving your laptop. Teams with strict data-locality requirements should use the GitHub App, which uses an Anthropic-issued OAuth flow per repo. Zero-Data-Retention organizations cannot use /web-setup at all; the GitHub App is the only path.

Cloud sessions run with the cloud’s preinstalled toolchain, plus whatever your setup script adds. Common runtimes (Node, Python, Bun) are preinstalled, but you cannot count on the exact versions, niche linters, or system packages your laptop has. A repo that pins a specific Node version via nvm works locally and silently runs against a different version in the cloud unless your setup script enforces it. The fix is .claude/setup.sh or a SessionStart hook that installs the exact toolchain. Audit claude --remote --setup-script output once before relying on it.

Auto-fix runs while you are not watching. The GitHub App receives a PR webhook, spins up a cloud session, runs the fix, and either pushes a follow-up commit to the PR branch or replies in review threads. If your repo’s .claude/settings.json gives auto mode a wide allow list, that auto-fix session runs with the same allowlist. Audit auto-mode rules with a “what would this look like running on a PR I never saw?” lens. The fix may not be the one you would have approved interactively.

Cloud environments expire, but the conversation is restorable. A long-idle cloud session is not a persistent VM; the environment is reclaimed and you see “environment expired” when you return. The conversation history can be reopened (Claude Code restores it into a fresh environment), but anything that lived only in the VM (uncommitted files, in-progress builds, processes you started) is gone. Push uncommitted work to a branch before you walk away.

When NOT to choose either surface

  • You are scripting in CI. Use claude in non-interactive mode (or the Agent SDK) from the CI runner directly. Web sessions are not designed for unattended CI runs; the CLI’s --continue, --print, and pipe-friendly modes are.
  • You are inspecting a repo you do not own. Cloud sessions need GitHub access; the CLI needs the local clone. Cloning the repo first and using the CLI is the only path that does not give Anthropic infra access to the code you are inspecting.
  • You need GPU acceleration or a specific runtime version Anthropic’s VM does not provide. The cloud environment has a fixed toolchain; the CLI runs whatever your laptop has.

Sources

  • Use Claude Code on the web
    Authoritative: cloud-VM model; GitHub auth options (App vs `/web-setup`); what loads in a cloud session vs what does not; `--remote` and `--teleport` for moving between surfaces; session sharing; auto-fix on PRs.
  • Quickstart
    Canonical CLI install and first session. Source for the CLI capabilities the cloud does not match (local files, your shell, your real environment).
  • Permission modes
    Permission behavior differs between surfaces: cloud sessions run in an isolated VM with no access to your local secrets, so the threat model and the prompts you see are not the same as on your laptop.

Was this helpful?