# Claude keeps logging out, keeps asking for verification, or throws a 403? Check whether your egress IP changed first

> Claude suddenly wants a CAPTCHA, you have to log in again and again, Claude Code stalls halfway through, and now and then you get a 403 — these aren't four separate problems but different faces of one thing: the signals the platform sees contradict each other. This article explains what it's looking at and how to check whether your egress IP has changed.

- Source: https://ipnet.coffee/en/news/claude-session-drop-exit-ip-change
- Published: 2026-11-19
- Updated: 2026-11-27
- Publisher: ipnet.coffee

Getting kicked back to the login page halfway through writing, or watching Claude Code suddenly stop dead while producing a long answer — your first thought is usually "is my account flagged?" Claude keeps logging out in ways that look a lot like an account problem, but that's an easy road to go down. There's really only one thing worth checking first: **did your egress IP change during this session?**

## Claude keeps logging out — that's only the mildest symptom

The situations below often get treated as four different problems, but they usually point at one thing: the signals the platform sees contradict each other.

- Yesterday you could log in directly; today it wants a CAPTCHA, and it pops up again right after you pass it.
- Sessions expire after a few minutes instead of lasting the normal few weeks.
- A long Claude Code task stalls halfway through — no error, it just stops moving.
- The page loads, but requests come back 403 or 429.

Logging out is only the mildest and most noticeable one. What really causes anxiety is the verification loop and the 403s, and they often have the same root cause.

## What is the platform actually looking at?

The platform doesn't publish its rules, but the observable signals are limited and enumerable. For a service like Claude that requires login, there are roughly seven:

- **The type of your egress IP**: residential, mobile, or a data center range.
- **The history of your egress IP**: who used this address before, and whether it has an abuse record.
- **Consistency between IP and account**: are the registration country, payment country, and usual location the same?
- **Account density on the same IP**: how many accounts sit behind one address.
- **How fast the location jumps**: Shanghai ten minutes ago and Los Angeles now — that change is itself a signal.
- **Where the DNS resolver sits**: egress in the US but the resolver on a domestic ISP is two pieces of evidence contradicting each other.
- **Time zone and language**: do the system time zone, browser language, and egress region line up?

None of these signals is fatal on its own. **Contradictions between them are what's fatal.** And a changing egress IP is the single easiest way to create several contradictions at once.

## Why is a changing egress IP so damaging?

A login state consists of two parts: the Cookie / Token stored in your browser or client, and the egress IP the server sees. The Cookie saves itself, but nobody guards your egress IP for you.

When you log in, the session the server issues is tied to the IP you had at that moment. If the next request arrives from a different address, the Cookie is still valid, but "same ticket, different person holding it" looks a lot like session hijacking to a risk system — so the usual reactions are: force a re-login, throw up a CAPTCHA, or just return 403.

Claude Code is more vulnerable than the web app. It holds a long-lived connection and receives output as a stream, so if the egress changes mid-run the connection drops, and the task **stalls** rather than exiting cleanly with an error.

## When does an egress IP change without you noticing?

- **Rotating proxies**: traffic-billed dynamic residential proxies often switch egress every request or every few minutes. Fine for scraping public pages, useless for anything that requires login.
- **Proxy clients picking nodes automatically**: Clash's url-test, fallback, load-balance, or "auto select" groups switch nodes when latency shifts — changing egress mid-session takes an instant.
- **Shared egress**: corporate NAT, enterprise VPN, cloud dev boxes, cheap shared data center IPs — the address changes when the node reconnects or rotates.
- **Network switching**: a laptop moving from office Wi-Fi to phone hotspot to home gets a new public IP each time.
- **Browser and terminal taking two different paths**: the proxy client is set to "system proxy," the browser follows it, but Claude Code in the terminal connects directly. Same account, two addresses at once.

That last one is the sneakiest; we'll cover how to check it separately below.

## Two-step self-check: did your egress actually change?

**Step one: look at the browser side.** Open [ipnet.coffee's Claude check page](https://ipnet.coffee/en/claude) and note the egress IP, its location, and the network type (residential or data center).

**Step two: look at the terminal side.** In the same terminal window where you plan to start Claude Code, run:

```bash
curl https://ipnet.coffee
```

The terminal returns the egress IP, country, ASN (definition in [ARIN's ASN explainer](https://www.arin.net/resources/guide/asn/)), and network type directly. Compare that with what the browser showed:

- They match: browser and terminal are using the same egress.
- They don't match: the terminal isn't going through the proxy, or it's on a different node. Fix that first — any other check is meaningless.

**Step three: check again mid-session.** Run the command above once before a long task starts and once while it's running. If the address changed, you've basically found the reason for the disconnects.

## How do you pin the egress?

**Pick the node manually in your proxy client.** Create a separate select-type group for Claude-related domains and pick a node by hand — don't use an auto-latency group. For which domains you need, see the [complete Claude Code routing rule list](https://ipnet.coffee/en/news/claude-code-proxy-domain-list).

**Make the terminal use the same egress.** Claude Code reads the standard proxy environment variables. macOS / Linux:

```bash
export HTTPS_PROXY="http://127.0.0.1:7890"
export HTTP_PROXY="$HTTPS_PROXY"
export NO_PROXY="localhost,127.0.0.1,::1"
claude
```

Windows PowerShell:

```powershell
$env:HTTPS_PROXY="http://127.0.0.1:7890"
$env:HTTP_PROXY=$env:HTTPS_PROXY
$env:NO_PROXY="localhost,127.0.0.1,::1"
claude
```

Replace the port with the HTTP port of your local proxy client. Note that Claude Code officially supports only HTTP / HTTPS proxies, not SOCKS, so don't just set ALL_PROXY=socks5://. Keep localhost in NO_PROXY so local dev services and your editor's language server don't get routed through the proxy.

**Pick an egress that doesn't change.** Services you stay logged into for a long time are best served by a static IP (static residential / ISP line), where the address stays the same for the whole period. Dynamic residential "sticky sessions" can hold an address for a while too, but when they expire the gateway swaps the IP, the previously issued Cookie becomes invalid, and you have to log in again. Per-request rotating proxies should never be used for any login scenario.

**One egress per person.** When several team members share one IP, it not only looks like "one account, many users" in the signals, it also stacks everyone's rate limits into the same bucket.

## Which habits make the signals worse?

This section isn't telling you what to do — it's a reminder of which common moves actively create contradictions:

- **Switching IP mid-session just to test**: worse than using no proxy at all; it looks exactly like a hijacked session.
- **Exporting in one terminal but starting in another terminal or IDE**: IDEs launched from a GUI often don't inherit your shell config, so the environment variables never take effect.
- **Forgetting NO_PROXY**: local services start going through the proxy, then time out.
- **Using free or shared data center IPs**: higher chance of being challenged, and you don't know who used that address before. Run it through the [in-depth IP score](https://ipnet.coffee/en/ip) first to see its type and blacklist records.
- **Retrying over and over the moment a verification pops up**: rapid retries are themselves a signal. Stop, sort out your environment, then try again.

## What does pinning the egress fix — and what doesn't it fix?

Pinning the egress fixes **continuity**: the same session uses the same address, the same ASN, and the same region from start to finish. It does not fix account permissions or plan limits, organizational policy restrictions, or underlying packet loss. If the line itself is dropping packets, no amount of IP stability will keep a long connection alive.

Also, your egress region is best kept consistent with where the account was registered and where it's paid from — don't be in the US today and Japan tomorrow; and even with a clean IP, keep your request rate normal.

If verification has already started repeating, don't rush to swap IPs. Align egress, DNS, and time zone item by item following the [full Claude Code proxy setup walkthrough](https://ipnet.coffee/en/news/claude-code-proxy-setup-guide), then run the [Claude environment check](https://ipnet.coffee/en/claude) again to see whether any contradictions remain. For the full DNS query chain, see [Cloudflare's DNS explainer](https://www.cloudflare.com/learning/dns/what-is-dns/), and for how time zone identifiers are named, see the [IANA time zone database](https://www.iana.org/time-zones).

If your account has already been suspended, or you're being asked for an ID plus a selfie, that's beyond what network tuning can fix. Go through official channels — the steps are covered in [Claude account suspended appeal: process, materials, and sticking points](https://ipnet.coffee/en/news/claude-account-suspended-appeal-guide) and [Claude identity verification persona: what happens during the check](https://ipnet.coffee/en/news/claude-persona-identity-verification). Don't trust any service that claims it can handle the appeal for you or speed up the unban.

## FAQ

### Is Claude logging out frequently a sign my account is about to be banned?

Not necessarily. Logging out, repeated verification, and 403s are often different faces of the same cause: the egress IP changed during the session. Check for egress drift first, then worry about the account.

### Why does Claude Code stall instead of throwing an error?

It holds a long-lived connection and receives output as a stream. If the egress changes mid-run, the connection drops, and what you see is a task that stops moving rather than a clean error exit.

### How do I quickly confirm the browser and terminal use the same egress?

In the same terminal where you start Claude Code, run curl https://ipnet.coffee and compare the returned IP with the one on the browser check page. If they don't match, fix that first — other checks are meaningless.

### Why can't I use an auto-select node group?

Groups like url-test, fallback, and load-balance switch nodes when latency shifts, so changing egress mid-session takes an instant. Create a select-type group for Claude and pick a node by hand.

### Does pinning the egress stop all disconnects?

No. It fixes session continuity. It can't fix account permissions, plan limits, or organizational policy, and it can't compensate for underlying packet loss.
