claude/for
Search
Subscribe
Claude Code

How do I print the full sign-in link with CLAUDE_CODE_FULL_SIGN_IN_LINK=1?

Set CLAUDE_CODE_FULL_SIGN_IN_LINK=1 in Claude Code 2.1.330 to print the full claude.ai login URL when the short one shows an error.

The string CLAUDE_CODE_FULL_SIGN_IN_LINK=1 is new in Claude Code 2.1.330, released on November 20, 2026. It makes Claude Code print the full claude.ai login URL instead of a short one. Set it before you sign in, and use it when the short link shows an error or when a script needs to read values from the link.

This guide is independent and unofficial. It follows Anthropic's changelog and documentation, both read on November 22, 2026.

We did not run this. The writing session had no access to the Claude Code CLI, so nothing below is a hands-on result and we show no sample output. The commands marked as candidates are our own assembly of documented pieces. Try them in a spare terminal window before you rely on them.

What the documentation says

The Claude Code changelog dates version 2.1.330 to November 20, 2026. One line under Added covers this variable:

Added CLAUDE_CODE_FULL_SIGN_IN_LINK=1 to print the full sign-in link, if the short one shows an error or a script reads values from it

The environment variables reference gives the longer entry: "Set to 1 to print the full claude.ai login URL instead of a short one. Use it when the short URL shows an error or your script reads values from the URL. Set it in your shell or user settings. Requires Claude Code v2.1.330 or later".

Three facts follow. The value is 1. It changes the link, not the login itself. And you can set it in your shell or in your user settings.

Which sign-in problem it fixes

Claude Code signs you in through a browser. Anthropic's authentication page says that on first launch, "Claude Code opens a browser window for you to log in". This variable is for one failure inside that flow: the short link that Claude Code shows produces an error.

It is not the fix for every login trouble. The installation and login troubleshooting page covers the others. For a browser that never opens, it says: "press c to copy the OAuth URL to your clipboard, then paste it into a browser manually."

For a remote session it adds: "If using a remote/SSH session, the browser may open on the wrong machine. Copy the URL displayed in the terminal and open it in your local browser instead."

Neither passage mentions the new variable, so we treat them as separate remedies. Try c first when the browser does not open. Reach for the variable when the link opens and shows an error.

Print the full link in five steps

now

Update Claude Code

Run claude --version. The environment variables reference says this variable requires version 2.1.330 or later.

now

Set the variable for one sign-in

Use CLAUDE_CODE_FULL_SIGN_IN_LINK=1 claude auth login in your terminal. This is our candidate command, not one copied from Anthropic.

next

Copy the URL the terminal prints

The troubleshooting page says that with claude auth login you copy the URL it prints.

next

Open it in your own browser

On a remote machine, open it in the browser on your local computer.

next

Paste the code if asked

Confirm the terminal shows Login successful, then run /status inside Claude Code.

The command in step two uses an ordinary shell habit: a variable placed before a command applies to that command only. The documentation does not show this exact line. If it behaves differently on your shell, export CLAUDE_CODE_FULL_SIGN_IN_LINK=1 on its own line does the same job for the whole window.

On the code step, the authentication page says: "If your browser shows a login code instead of redirecting back after you sign in, paste it into the terminal at the Paste code here if prompted prompt." It also says the terminal shows Login successful when login completes.

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.

Keep it set for every sign-in

The documentation names two places: your shell and your user settings. For the shell, add the export line above to your shell profile, such as ~/.zshrc or ~/.bashrc.

For user settings, Anthropic's settings page lists ~/.claude/settings.json as the user file and says "An env block inside a settings file is an ordinary key". Our candidate entry, assembled from those two pieces:

{
  "env": {
    "CLAUDE_CODE_FULL_SIGN_IN_LINK": "1"
  }
}

The settings page warns that settings files are strict JSON, so a // comment or a trailing comma is a syntax error. Run /status afterward to confirm the file loaded, as that page suggests. Whether a change applies to a window that is already open is not stated for this variable, so open a new terminal.

Reading the link in a script

The changelog says the variable helps when "a script reads values from it". Neither the changelog nor the reference says what those values are, how the full link is shaped, or how to pull a value out of it.

So we give no parsing example. Print the link once in a safe place, look at it, and write your parser against what you see. Our own caution: treat the printed link as private until you know what it carries. Do not paste it into a ticket or a chat.

Where this does not help

  • We did not run it. We cannot confirm the output, the link's length or when the short link fails.
  • The cause of the short link's error is undocumented. The reference says only "when the short URL shows an error".
  • It does not touch your credentials. Which credential wins is a separate topic, covered in our API key guide.
  • Managed machines add rules. An administrator can restrict which logins are allowed. See our managed settings guide.
  • It is days old. Check the changelog again before you build a routine on it.

If your login ends while you work, that is a different question, answered in our guide to checking login expiry.

What does CLAUDE_CODE_FULL_SIGN_IN_LINK=1 do?

It makes Claude Code print the full claude.ai login URL instead of a short one. Anthropic's reference says to use it when the short URL shows an error or when your script reads values from the URL. It affects only the sign-in link.

Which Claude Code version added CLAUDE_CODE_FULL_SIGN_IN_LINK=1?

Claude Code 2.1.330, dated November 20, 2026 in Anthropic's changelog. The environment variables reference says the variable requires version 2.1.330 or later. Run claude --version to see what you have, and update if it is older.

Where do I set CLAUDE_CODE_FULL_SIGN_IN_LINK=1?

The reference says "Set it in your shell or user settings." In a shell, export it or put it before claude auth login. For user settings, our candidate is an env block in ~/.claude/settings.json. Both lines are our assembly, so test them first.

Does CLAUDE_CODE_FULL_SIGN_IN_LINK=1 fix a browser that will not open?

Not as far as the documentation says. It names two uses: a short URL that shows an error, and a script that reads the URL. For a browser that does not open, Anthropic's troubleshooting page says to press c and paste the copied URL into a browser.

If you want a short note when Anthropic changes a sign-in step that breaks your setup, the newsletter sends one only when it matters.

Sources (checked 2026-11-22)

The Claude moves worth stealing, by email

Workflows tested on real jobs, sent only when they are worth it. Free.