Back to blog
Quality
Claude Code

Why does Claude Code keep logging you out after updates?

Thắng Đoàn
Thắng Đoàn

Scripted claude -p jobs failing mid-run because stored credentials expired with no warning, plus silent config drops on shared network home directories, made multi-terminal Claude Code work unreliable. Version 2.1.318 surfaces sign-in expiry in claude auth status, warns on stderr before credentials run out, and fixes config locking.

What it is

A patch release of Claude Code adding credential expiry reporting, an effort option for $.model.fork, and fixes for config writes, memory growth, and permission prompt races. It also records answers when Claude asks to enable mods it writes.

  • loginExpiresAt in claude auth status and credential_expires_at in claude -p JSON
  • stderr warning 10 days before stored sign-in ends
  • assume_role on gateway upstreams for per-developer AWS cost attribution

Applied case

A team sharing a network home directory had /logout and claude mcp remove report success while changes were silently dropped because the config file could not be updated. Now those commands report failure, and claude mcp add and remove wait for the config lock or exit 1, though another job's save can still replace a saved server, so the risk is reduced rather than eliminated. A developer running jobs from two terminals stops hitting 'Not logged in' when one terminal re-signs in to the same account.

  • Config lock fixes prevent silent loss of MCP servers and trust settings on shared home dirs

When to use it

Use when you run Claude Code on shared network home directories, multiple terminals, or scripted claude -p jobs needing credential expiry visibility. Skip when none of these auth or config issues affect your setup.

Read more

Claude Code v2.1.318 release

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

By subscribing you agree to receive the newsletter. No spam, and you can unsubscribe anytime.