Skip to content

AI Compass / News

Claude Code 2.1.318: unattended runs now show when your sign-in expires

Automation

The 4 November release shows when your claude.ai sign-in ends, warns ten days ahead and says what to do once it has expired. It also brings fixes for scripts and scheduled jobs.

Source: Claude Code v2.1.318 (GitHub Release),

Note: I use Claude and Claude Code for my own work. Anthropic does not pay me, and the links are not affiliate links.

Technical drawing: a timeline running up to the sign-in expiry, marked loginExpiresAt. The last ten days before it are highlighted, with a warning sign at their start.Technical drawing: a timeline running up to the sign-in expiry, marked loginExpiresAt. The last ten days before it are highlighted, with a warning sign at their start.

What happened: Claude Code 2.1.318 came out on 4 November 2026. Many people run Claude Code unattended, for example with claude -p in scripts or scheduled jobs. That is the non-interactive mode: one request, one answer, no back-and-forth. An expired claude.ai sign-in often only shows up there once a run fails. This release brings three changes for that:

There are also fixes, two of them for unattended runs. Jobs used to stop with Not logged in when another terminal or machine sharing the same home directory signed in again to the same account. That is fixed. And a non-interactive start no longer silently replaces a damaged ~/.claude.json with defaults: the start stops and tells you how to restore the file.

What this means: If you use Claude Code in routines, you can now see the expiry coming instead of finding out from a failed run. The warning goes to the error output, though, so if your script does not capture it, you will miss it.

What you can do:

  1. Update Claude Code to version 2.1.318 or later.
  2. Check when your sign-in expires with claude auth status.
  3. Have your scripts read credential_expires_at or log the error output so the warning reaches you.

The card Long runs and parallel work covers more on long unattended runs.

Context: The details come from Anthropic’s release notes. I have not tested this myself. Newer versions may have come out since 2.1.318, and the changes described here are still included.

My workshops show you how to bring AI into your team. See the workshops