Skip to main content
ClaudeREF.com
← All news
4 November 2026claude-code#claude-code#release#authentication#mcp#plugins

Claude Code v2.1.318: safer sessions, plugins, and MCP startup

Claude Code v2.1.318 reports login expiry, hardens plugin and MCP startup, and fixes session and compaction edge cases.

Claude Code v2.1.318 is a maintenance-heavy release with several changes that matter when Claude runs unattended or on shared infrastructure. It exposes stored-login expiry information, makes plugin and MCP startup more predictable, and fixes failures involving session recovery, idle compaction, configuration writes, and background processes.

The changes worth knowing

Authentication status includes expiry information

claude auth status now reports the end date of a stored claude.ai sign-in as loginExpiresAt. Headless claude -p JSON results expose the same idea as credential_expires_at, and text output warns on stderr beginning ten days before expiry. This gives CI wrappers and self-hosted runner operators a chance to renew credentials before a scheduled job fails.

The warning applies to stored claude.ai sign-ins, so it should not be treated as a universal expiration signal for every authentication method. Keep the output out of logs that are shared broadly: authentication metadata can still help identify an account or renewal window.

Plugin commands wait for slow token refreshes

Plugin commands no longer exit before a slow token refresh is saved. The old behavior could make the next command appear logged out even though the preceding command had successfully refreshed credentials. The same release also makes claude plugin validate reject a marketplace file that validation accepts but claude plugin marketplace add would later reject because of its custom filename.

Together, these fixes make plugin installation and marketplace checks easier to use in automation: validate the same file shape that the installer accepts, and avoid assuming that a command’s early exit means the refresh was persisted.

MCP startup avoids repeated failed probes

Stdio MCP servers that exit during the version probe are no longer re-probed on every startup. A server that exits in under three seconds for its own reason is also pinned to the legacy handshake for seven days. This reduces repeated startup work for servers that cannot complete the newer probe, but it also means operators should investigate the server process and logs instead of treating the fallback as proof that the integration is healthy.

Session and compaction reliability improves

The release fixes --continue losing the earlier conversation after malformed tool-call retries, idle compaction replacing a conversation with a non-summary reply, and sessions being refused because another login on the same machine stored an allowedProviders list. It also fixes headless and Agent SDK sessions reporting success when an API error cut off a reply while a mod hook was running.

These are difficult failures to notice from a simple exit code. If you wrap Claude Code, inspect structured results and preserve enough session identifiers to correlate a failed or resumed run with its transcript.

Shared configuration writes are safer

/logout, claude auth logout, claude mcp remove, and trust, consent, or MCP-setting changes now report failure when a shared network home cannot be updated, instead of claiming success and silently dropping the change. claude mcp add and claude mcp remove also wait for the configuration lock or exit with status 1.

That is a useful operational distinction: a successful command now better represents a persisted configuration change, while a lock or network-home failure should be retried or investigated.

What to do before upgrading

Update a disposable or canary environment first. If you run scheduled or self-hosted jobs, record loginExpiresAt or credential_expires_at without exposing complete credential output, and alert before the ten-day warning window. For MCP and plugins, test a cold start and verify that marketplace files use the filename and format accepted by the install command. Finally, make wrappers treat structured API failures and configuration-write errors as failures even when an earlier process step appeared to succeed.

claude update
claude --version
claude auth status

The English item is reviewed against the official release notes and current Claude Code documentation. Hebrew and Spanish translations are AI-only drafts and remain unpublished until their terminology, technical tokens, links, and formatting receive review.

Claude Code v2.1.318 release notes · Authentication · MCP · Plugin commands · Claude Code documentation index