The very first time you type claude in a terminal, nothing happens until you sign in: the CLI pauses and hands authentication off to your browser before a single command will run. Getting Claude Code authenticated with a Pro or Max account on first run takes under a minute once you know which prompt to pick, and it saves you from the common mistake of pasting an API key when your subscription already covers usage.

Quick Answer

Run claude, choose the Claude.ai login option (not the API key option), and a browser tab opens for sign-in. Authorise the connection and the CLI confirms it is linked to your Pro or Max plan. A free-tier account cannot activate Claude Code, so an active Pro or Max subscription is required.

The first-run sign-in flow

When Claude Code launches for the first time it has no stored credentials, so it asks how you want to log in. Select the option that signs in with your Claude.ai account rather than the developer API key path. The CLI then opens your default browser to an authorisation page.

If you are already signed in to claude.ai in that browser, approval is close to instant: you click Authorise, the page confirms success, and you can return to the terminal where Claude Code reports the connection is live. Under the hood a Pro or Max login is held as an OAuth token tied to your subscription, which is why you never paste a key for this path. To start over later, type /logout at the prompt and the next launch repeats this flow.

Why a Pro or Max plan is needed

Free Claude accounts cannot activate the CLI, so the sign-in will not complete without a paid plan. Pro suits lighter, single-project use, while Max raises your usage allowance considerably for heavier coding sessions and is the choice if you hit limits often. Both authenticate through the same browser step described above, so the only practical difference at first run is how much headroom you have before usage caps.

Choosing the plan is a budgeting call, not a technical one. If you are mostly experimenting, start on Pro and step up to Max when your daily work outgrows it. The local machine matters too: comfortable agentic coding wants a capable CPU and plenty of RAM, which is where the AI-ready desktop range at Evetech is worth a look before you commit to long sessions.

Pro vs Max in practice

The authentication step is identical for both plans, but what you get after signing in differs meaningfully. As of 2026, Max carries rate limits roughly five times higher than Pro and includes access to the most capable models in the Claude 4 family. For daily agentic coding -- long sessions, large codebases, frequent tool calls -- that headroom is the difference between uninterrupted flow and a mid-task rate-limit pause.

Pro is a sensible starting point. If you consistently hit its usage cap before your working day ends, that is the clearest signal to step up. Both plans use OAuth credentials exclusively for Claude Code and claude.ai; an important update from early 2026 confirmed that using those tokens in any third-party tool or external service is outside the terms of service, so the subscription path is intended for the official client only.

How the OAuth token is stored and refreshed

Once you authorise the CLI, it writes a short-lived access token and a refresh token to your local credential store. You do not need to repeat the browser flow on every launch. The CLI exchanges the refresh token for a new access token silently in the background whenever the current one nears expiry. The credential persists across restarts and updates, so the full browser authorisation only happens on first run or after a deliberate /logout.

If the browser step does not complete

A few things trip people up. If the tab never opens, copy the URL the CLI prints and paste it into a browser manually. If authorisation fails, confirm you are signed in to the same Claude account that holds the subscription, since a second logged-in account in the browser can grab the request. Corporate proxies and strict firewalls can also block the callback, so try a personal network if the loop stalls.

Once linked, the credential persists, so you only do this on first run or after a deliberate logout. A reliable, well-specced workstation removes a lot of friction here, and the best-selling PCs at Evetech cover machines that handle this kind of workload comfortably.

Frequently Asked Questions

Can I use Claude Code on a free Claude account?

No. The first-run sign-in will not activate the CLI on a free plan. You need an active Pro or Max subscription, and the authorisation step checks this before unlocking commands.

Do I need an API key as well as my subscription?

No. The Pro or Max path uses a browser sign-in that stores an OAuth token, so you do not paste an API key. The key-based path is a separate billing method for developers who prefer pay-as-you-go.

How do I switch accounts after signing in?

Type /logout at the Claude Code prompt, then relaunch. The next run reopens the browser sign-in so you can authorise with a different account.

What is the difference between Pro and Max for Claude Code?

Both authenticate identically. Max gives you approximately five times the usage allowance of Pro and access to the top-tier models, which matters for long or frequent coding sessions. Pro is enough for lighter, occasional use.

Does the credential expire between sessions?

No. The CLI refreshes the token automatically in the background. You only see the browser authorisation screen on first run or after you explicitly log out.

Long agentic coding sessions reward a machine with headroom. Pair your Pro or Max plan with a workstation built for the job from the AI PC range at Evetech and keep Claude Code responsive through the heaviest tasks.