# Claude Code Now Warns 10 Days Before Your Login Expires

> Claude Code 2.1.318 shows the date your claude.ai sign-in ends and warns 10 days ahead in scripted runs. What it means for overnight, unattended AI work.

Canonical: https://bridge-terminal.com/atlas/blog/claude-code-login-expiry-warning-unattended/
Last updated: 2026-11-05

Published 5 November 2026 · Plain English · What's new · 6 min read

## The short version

- Claude Code 2.1.318 (4 November 2026) shows the date your stored claude.ai sign-in ends, so an expiry no longer has to be a surprise.
- In scripted runs (claude -p), a one-line warning appears starting 10 days before the sign-in ends. Interactive sessions already warned 3 days ahead.
- Once a sign-in has expired and cannot be refreshed, every request fails, so unattended work stops until a person signs in again. Check the date before a long run.
- The warning applies only when a claude.ai login is the credential in use, not when an API key, an auth token, a key helper or a cloud provider supplies access.
- Atlas runs on your own Claude plan, so it is affected by the same expiry. It does not yet warn ahead of time; that is coming to Atlas, built in, with no setup.

Claude Code can now tell you when your claude.ai sign-in is going to end, instead of letting it fail on you. Version 2.1.318, released on 4 November 2026, shows the expiry date in a status command, and scripted runs print a warning starting 10 days before. If you let an AI coding agent work overnight or over a weekend, this is the early notice that was missing.

## What changed in Claude Code on 4 November 2026?

Claude Code is Anthropic's AI coding agent. Most people sign it in with a Claude account (Pro, Max, Ultra, Team or Enterprise). That sign-in is not permanent. After some time it ends, and the agent needs a person to sign in again.

The official changelog for version 2.1.318 lists these related items:

- The date a stored claude.ai sign-in ends is now shown by the command `claude auth status`. It is also included in the results of scripted runs.
- Scripted runs (the `claude -p` mode, where Claude Code works without a person at the keyboard) now print a one-line warning starting 10 days before the stored sign-in ends. The changelog says the warning goes to stderr, the channel programs use for warnings and errors, and that it appears in the plain-text output.
- When a sign-in does reach its time limit, the error message now says so. In scripted runs it also names the two ways to fix it: `claude auth login` and `claude setup-token`.

The day before, version 2.1.317 (3 November 2026) fixed a related problem: `claude auth status` could finish before a slow renewal of the sign-in was saved, which could sign you out on the next run. The same release stopped a region or network block (an HTTP 403 error) from being shown as a sign-in failure. The message now explains the block.

The changelog gives short summaries only. It does not print the exact wording of the new warning, so look at your own terminal for that.

## Why does a sign-in expiry matter for a team?

A person at a keyboard sees a sign-in prompt and deals with it. An agent working alone cannot.

Claude's authentication documentation says renewing early "matters most for sessions that run unattended". It explains that a background session that outlives the login stops making progress once the credential expires, and it cannot recover until you sign in again.

Picture the cost. You start a long task on Friday evening: a big refactor, a test clean-up, a batch of fixes. On Monday morning you find the agent stopped on Saturday because the sign-in ran out. You lose the weekend, not because the agent was slow, but because of a date nobody was watching.

That is a small problem for one person with a laptop. It is a bigger one for a team that treats the agent as a colleague who works while everyone else is away.

## What did Claude Code already do before this update?

Interactive sessions, where a person is typing in the terminal, already had a warning. According to the documentation, when a login created with `/login` is within three days of expiring, Claude Code shows a notice at startup: "Your login expires in 3 days · run /login to renew". The notice is informational. It never blocks a request, and the sign-in keeps working until it actually expires.

Two other things already existed:

- Once the login has expired and cannot be refreshed, every request to the model fails with "Login expired · Please run /login".
- The `/status` screen shows a Login row reading "Expired — log in again". This appears only when the saved claude.ai login is the credential in use, and it needs Claude Code 2.1.210 or later.

So the new part is aimed mainly at unattended and scripted use. There, nobody sees a startup notice, and three days is a short window if the next working day comes after a long weekend. Ten days, and a date you can read from a status command, give a team room to plan.

## Does the warning apply to every way of signing in?

No, and this is worth reading twice.

The documentation says the warning appears only when a claude.ai login is the credential in use. It does not appear when access comes from a cloud provider such as Amazon Bedrock, from an API key, from an auth token, or from a key helper (a small script that hands Claude Code a key).

There is also a separate route for scripts and automation. The command `claude setup-token` creates a one-year token for pipelines and scripts where a browser login is not possible. It needs a Pro, Max, Ultra, Team or Enterprise plan. The token is printed once and is not saved by Claude Code, so you store it yourself in an environment variable (a named setting your computer passes to programs) called `CLAUDE_CODE_OAUTH_TOKEN`. That token can only make model requests. It cannot start Remote Control sessions or fetch claude.ai connectors.

Which route you use decides which expiry you have to watch. If you cannot tell from your setup, ask whoever set it up.

## What should a team do about it?

You do not need to change how you work. A few habits are enough.

1. **Find out how your agents sign in.** Is it a person's claude.ai login, a long-lived token, an API key or a cloud account? Write the answer down.
2. **Know the date.** For a claude.ai login on version 2.1.318 or later, ask an engineer to run `claude auth status` and read the expiry date. Put it in a shared calendar.
3. **Renew before long unattended work.** If the date falls inside the time you plan to be away, sign in again first. The documentation says to run `/login` to renew.
4. **Update Claude Code.** The date in the status command and the 10-day warning exist only from version 2.1.318 on.
5. **Treat a stopped run as a possible sign-in problem.** If an automated job stops making progress with no obvious cause, the login is one of the first things to check.

None of this costs money. It costs a few minutes and one calendar entry.

## How does Atlas handle sign-in expiry today?

[Atlas](https://bridge-terminal.com/atlas/) is a team of AI engineers built on Claude Code. It needs your own Claude account with Claude Code (Claude Pro or Max) and runs Claude Code in the terminal, signed in with that plan. So Atlas work is affected by the same expiry as anything else you run on that plan, and with several engineers working at once, one lapsed sign-in affects all of them.

Atlas does show how much of your Claude plan is being used on its Home screen. It does not yet warn you ahead of time that your Claude sign-in is about to end. That warning is coming to Atlas, built in, so it needs no setup on your side. Until then, do what is described above: check the expiry date with Claude Code's own status command, and renew before you leave a team working unattended.

## The short version

A sign-in that quietly expires is one of the dullest ways to lose a night of AI work, and Claude Code 2.1.318 makes it easier to avoid. Update, find out the date, and renew before any long unattended run. If your agents use an API key or a cloud account instead of a claude.ai login, this warning does not apply to you, but the same question does: what runs out, and when?

## Questions people ask

### How do I check when my Claude Code login expires?

From Claude Code 2.1.318 (4 November 2026), the command claude auth status shows the date your stored claude.ai sign-in ends. Scripted runs (claude -p) also include it in their JSON results as credential_expires_at.

### When does Claude Code warn that my login is about to expire?

Scripted runs (claude -p) print a one-line warning, on stderr in text output, starting 10 days before the stored claude.ai sign-in ends. Interactive sessions show a notice at startup when the login is within three days of expiring.

### What happens to an unattended AI agent when its sign-in expires?

It stops making progress and cannot recover until someone signs in again. Once the login has expired and cannot be refreshed, each model request fails with a login-expired error, so a long overnight or weekend run can be lost.

### Does the expiry warning apply if I use an API key?

No. The warning appears only when a claude.ai login is the credential in use. It does not appear when a cloud provider, an API key, an auth token or a key helper supplies access.

### How do I renew an expiring Claude Code login?

Run /login inside Claude Code to sign in again. For scripts and pipelines, claude setup-token creates a one-year token that you store in the CLAUDE_CODE_OAUTH_TOKEN environment variable.

## About Atlas: Sign-in expiry and a team that works unattended

Atlas runs its engineers as Claude Code sessions signed in with your own Claude plan, so a lapsed sign-in affects the whole team. A warning ahead of the expiry date is coming to Atlas, built in, so it needs no setup. Until then, check the date with Claude Code and renew before long unattended work. — https://bridge-terminal.com/atlas/

## Sources

- [Claude Code changelog (versions 2.1.317 and 2.1.318)](https://code.claude.com/docs/en/changelog)
- [Claude Code documentation: Authentication](https://code.claude.com/docs/en/authentication)

_Researched and drafted with Claude, then checked against the sources above. Atlas is an independent product, not affiliated with Anthropic or OpenAI._

## Related

- [How to Write a Spec With an AI Coding Agent (No Code)](https://bridge-terminal.com/atlas/blog/write-spec-with-ai-coding-agent-plain-guide/)
- [Does an AI Coding Agent Share Your Code? Plain Guide](https://bridge-terminal.com/atlas/blog/does-ai-coding-agent-share-your-code-privacy/)
- [How to Report a Bug to an AI Coding Agent](https://bridge-terminal.com/atlas/blog/how-to-report-a-bug-to-ai-coding-agent/)
