skip to content

Setup & Platforms

Installing Claude Code, choosing what it bills (subscription, Console key or cloud provider) and where it runs, from CLI and IDEs to cloud sessions. Asked because setup fixes cost and capability.

part ofClaude Coderead it →
on this pageshow

explore

questions

11

Which kinds of account can you sign in to Claude Code with, and what happens at first launch with each?

level: juniorimportance: must knowfreq 30%

answer

  1. free plan is not on the list
  2. subscription seat vs Console organization
  3. cloud provider: no browser at all
  4. an exported key changes the prompt
  5. /status names the login method

basics

~20 s

Claude Code accepts a Pro or Max subscription, a Team or Enterprise seat, a Claude Console account, or a cloud provider such as Amazon Bedrock; the free claude.ai plan is excluded. First launch opens a browser login, except for cloud providers.

solid answer

~40 s

Claude Code needs a paid account: a **Pro or Max** subscription, a **Team or Enterprise** seat (both log in with a claude.ai account), a **Claude Console** account an admin invited you to, or a **cloud provider** - Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry. The free claude.ai plan does not include it. On first launch `claude` opens a browser login; if the browser cannot reach the local callback (WSL2, SSH, containers) you paste the code it shows. If `ANTHROPIC_API_KEY` is already set, it asks you once to approve the key instead. Cloud providers skip the browser: you set their environment variables or pick **3rd-party platform** at the login prompt. `/status` shows which login is active, and `/logout` resets it.

go deeper

for a junior

Name the accepted account types, say that the free plan is excluded, and describe the browser login, including pasting the code when the redirect fails.

for a middle

Explain how an ANTHROPIC_API_KEY changes first launch into a one-time approval, and how /status tells a subscription login from an API key.

for a senior

Tie the account type to billing and features: a Console key bills per token, and some features need a claude.ai login rather than a key.

for a principal

Weigh Team or Enterprise seats against Console keys and a cloud provider for a rollout, by billing model, admin control and what each login unlocks.

## The account types Claude Code accepts Claude Code is not usable anonymously and not on the free claude.ai plan. It authenticates against one of five kinds of account, and the kind you pick decides **who is billed** and **which features need a claude.ai login**. | Account | How you sign in | Who pays | |---|---|---| | **Pro or Max** subscription | browser login with your claude.ai account | your subscription | | **Team or Enterprise** seat | browser login with the claude.ai account your admin invited | the organization's seats | | **Claude Console** | browser login with Console credentials, after an admin invite | per token, to the Console organization | | **Cloud provider** (Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry) | environment variables or a setup wizard; no browser | your cloud account | | **Claude apps gateway** (self-hosted) | corporate SSO through `/login` | the provider the gateway routes to | For teams the docs recommend **Claude for Teams or Enterprise**: members get Claude Code and Claude on the web with centralized billing. The **Console** route suits organizations that prefer API-based billing; admins invite users and give them either the **Claude Code** role (can only create Claude Code API keys) or the **Developer** role (can create any API key). At the `/login` prompt a Console user can either keep the browser sign-in as an Anthropic profile login, labelled recommended, or have Claude Code create a Console API key, labelled legacy. ## What the first launch does 1. You run `claude` in a terminal. 2. Claude Code opens a browser window for the login. If it does not open, press `c` to copy the login URL and paste it into a browser yourself. 3. If the browser shows a **login code** instead of redirecting back, paste it at the `Paste code here if prompted` prompt. This happens when the browser cannot reach Claude Code's local callback server, which is common in **WSL2, SSH sessions and containers**. 4. The terminal shows `Login successful` and asks you to press Enter. Two cases change this flow: - **`ANTHROPIC_API_KEY` is set** in the environment: Claude Code skips the browser and asks you once to approve or decline the key. Your choice is remembered. - **A cloud provider**: you either export its switch (`CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_USE_VERTEX` or `CLAUDE_CODE_USE_FOUNDRY`) with its credentials before running `claude`, or choose **3rd-party platform** at the login prompt, which starts an interactive wizard for Bedrock and for Google Cloud's Agent Platform. No browser login is involved. ## Checking and switching the login - **`/status`** shows the account in use. A `Login method` row such as a Claude Max account means a subscription; an `API key` row means requests go to a Console organization. - **`/logout`** signs you out and also resets first-launch setup, so the next `claude` walks you through login again. - **Two accounts side by side** (work and personal): give each its own configuration directory with `CLAUDE_CONFIG_DIR`, for example an alias `claude-work` that sets it. Each directory keeps its own settings, history and login. ## Where the credential lives - **macOS**: the encrypted Keychain. If the Keychain rejects the write, as it can when locked in an SSH session, the login falls back to `~/.claude/.credentials.json` with mode `0600`. - **Linux**: `~/.claude/.credentials.json`, mode `0600`. - **Windows**: `%USERPROFILE%\.claude\.credentials.json`, protected by the profile directory's access controls. With `CLAUDE_CONFIG_DIR` set, the file and the Keychain entry both follow that directory. ## When the login goes stale A claude.ai login does not last forever, and three situations catch people out: - **Expiry.** Within three days of expiry, Claude Code warns at startup: `Your login expires in 3 days · run /login to renew`. The warning never blocks a request. Once the login has expired and cannot be refreshed, each request fails with `Login expired · Please run /login`, and `/status` shows a `Login` row reading `Expired — log in again`. - **Unattended sessions.** A long-running session that outlives the login stops making progress until someone signs in again, so renew early before leaving work running. - **A leftover key.** An old `ANTHROPIC_API_KEY` in a shell profile that you once approved quietly replaces the subscription; `/status` is where you notice it. ## Why interviewers ask The account type is not cosmetic. It decides whether usage draws on a plan or is billed per token, and some features exist only with a claude.ai login - Remote Control, for instance, needs a Pro, Max, Team or Enterprise plan and does not accept API keys. A candidate who can say which login is active, and how to check it, will not be surprised by a bill or a missing feature.

  • You need a work and a personal Claude Code login on one laptop. How do you keep both signed in?
    Give each account its own configuration directory with `CLAUDE_CONFIG_DIR`, for example `alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'`. Each directory keeps its own settings, session history and login, and on macOS the Keychain entry is keyed to the directory too. The first run of the alias walks you through login for that directory.
  • Why might a login over SSH show a code instead of returning to the terminal on its own?
    The browser normally redirects back to a local callback server that Claude Code starts. Over SSH, in WSL2 or in a container the browser usually cannot reach that server, so it shows a code instead. You paste it at the `Paste code here if prompted` prompt and the login completes.

  • The free claude.ai plan is enough to use Claude Code
  • Cloud provider users still sign in through the claude.ai browser login
  • A set ANTHROPIC_API_KEY is ignored until you log out
  • /logout only clears the token and keeps first-launch setup
  • Two accounts need two separate Claude Code installations
open as a page

Which Claude Code capabilities exist only in the CLI, and what do Desktop and the VS Code and JetBrains integrations offer instead?

level: juniorimportance: must knowfreq 26%

basics

~20 s

Non-interactive claude -p runs and the Agent SDK are CLI-only, and the CLI has every command and permission mode. Desktop adds visual diffs, panes and parallel sessions, VS Code a graphical panel, and the JetBrains plugin runs the CLI inside the IDE.

open as a page

In Claude Code, how does a Remote Control session differ from a cloud session in where it runs and what it can reach?

level: middleimportance: must knowfreq 22%

basics

~20 s

Remote Control lets claude.ai or the Claude app drive a session that keeps running on your machine, with your files, tools and MCP servers. A cloud session runs on a fresh clone in an Anthropic-managed VM and continues after you disconnect.

open as a page

When several credentials are present, how does Claude Code choose one, and why can a stray ANTHROPIC_API_KEY move a subscriber onto API billing?

level: seniorimportance: must knowfreq 22%

basics

~10 s

Claude Code takes the highest credential in a fixed order: cloud provider switch, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, apiKeyHelper, CLAUDE_CODE_OAUTH_TOKEN, profiles, then the /login subscription. An approved ANTHROPIC_API_KEY therefore beats a subscription and bills its Console organization.

open as a page

How do Claude Code updates differ between the native installer and Homebrew, WinGet or apt, and what does autoUpdatesChannel control?

level: middleimportance: should knowfreq 16%

basics

~20 s

Native installs update themselves in the background; Homebrew, WinGet, apt, dnf and apk installs do not by default. autoUpdatesChannel chooses latest (default) or stable for native updates; Homebrew and the Linux repositories choose the channel by cask or repository.

open as a page

How do `claude remote-control`, `claude --remote-control` and `/remote-control` differ in Claude Code, and what makes a Remote Control session go offline?

level: middleimportance: should knowfreq 9%

basics

~20 s

claude remote-control runs a server with no local prompt that can serve many sessions; claude --remote-control starts one interactive session also reachable remotely; /remote-control connects the session you are in. Each goes offline when the machine sleeps or the claude process stops.

open as a page

How do you point Claude Code at Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry, and what changes about login once you do?

level: seniorimportance: should knowfreq 10%

basics

~10 s

Set CLAUDE_CODE_USE_BEDROCK, CLAUDE_CODE_USE_VERTEX or CLAUDE_CODE_USE_FOUNDRY with that cloud's credentials, or run the /setup-bedrock or /setup-vertex wizard. There is no browser login; the provider switch outranks Anthropic keys and the subscription.

open as a page

For a non-interactive Claude Code job in CI, when do you authenticate with claude setup-token and CLAUDE_CODE_OAUTH_TOKEN instead of ANTHROPIC_API_KEY?

level: seniorimportance: should knowfreq 12%

basics

~20 s

Use claude setup-token when CI should run on a Pro, Max, Team or Enterprise subscription: it prints a one-year OAuth token you store as CLAUDE_CODE_OAUTH_TOKEN. Use a Console ANTHROPIC_API_KEY for shared secrets, per-token billing, or --bare runs.

open as a page

A Claude Code cloud session can't see your user-level MCP servers, skills or AWS SSO login — what does it actually inherit and reach?

level: seniorimportance: should knowfreq 11%

basics

~20 s

What the repository carries: CLAUDE.md, .claude/ skills, agents and rules, and in a one-repository session its settings.json and .mcp.json. User-level files, locally added MCP servers, plugins and interactive SSO never arrive, and outbound network defaults to the Trusted allowlist.

open as a page

From the Claude Code CLI, how do `--cloud`, `--teleport` and `/desktop` move work between surfaces, and what does each carry or leave behind?

level: seniorimportance: should knowfreq 9%

basics

~20 s

claude --cloud starts a new cloud session from your GitHub remote's current branch; --teleport pulls a cloud session's branch and conversation into the terminal; /desktop moves the CLI session into Desktop. No CLI command pushes a running session to the cloud.

open as a page

What does starting Claude Code with `--chrome` let the agent do, and what keeps the Chrome integration switched off?

level: middleimportance: nice to knowfreq 6%

basics

~20 s

claude --chrome connects the session to the Claude in Chrome extension, so Claude can open tabs, click, type, read console output and use sites you are signed into. It stays off on an API key or setup-token login, third-party providers and WSL.

open as a page