Claude Code release notes: 2.1.318 shows login expiry
Part of the series: Claude Code release notes

Claude Code 2.1.318 now shows when a stored claude.ai sign-in expires. For people running recurring jobs, this provides a chance to renew the login before the next run fails.
Claude Code exposes expiry dates and advance warnings
Human step: Run claude auth status in your terminal. In version 2.1.318, the result includes the expiry date in loginExpiresAt.
In JSON results from claude -p, which runs Claude without an interactive conversation, the field is named credential_expires_at. Runs using text output also receive a warning on the standard error stream, stderr, starting ten days before the stored login expires. A job that saves only standard output therefore needs to capture stderr as well to retain that warning.
Source: Anthropic's Claude Code 2.1.318 release notes.
When the login has expired
The error message now says that the stored login has reached its time limit. In claude -p mode, it points to claude auth login and claude setup-token. The update does not renew the login automatically; it makes the expiry date and reason for failure clearer.
This applies to stored claude.ai sign-ins. The release note does not describe an equivalent time limit for API keys.
Source: Claude Code 2.1.318: authentication and non-interactive runs.
Version 2.1.318 was published on GitHub on November 4 and was the latest version in the npm registry when checked on November 5, 2026.
Source: Anthropic's Claude Code package in the npm registry.
The Forge newsletter
Get new articles in your inbox
Pick the topics you care about. No noise, at most one email a week.
We follow GDPR. Unsubscribe anytime.


