Source · release
Claude Code release 2.1.318
Summary
Claude Code 2.1.318 was released on 2026-11-04. It is mostly a reliability release:
many fixes for config files on shared network home directories, headless runs that
reported success after an error, and cloud and Remote Control sessions. The new features
are sign-in expiry reporting for unattended runs, an effort option for a mod's model
fork, cross-account AWS roles on the Claude apps gateway, and cloud sessions that need no
repository.
Key points
- Sign-in expiry for unattended runs:
claude auth statusshowsloginExpiresAt,claude -pJSON results includecredential_expires_at, andclaude -ptext output prints a one-line stderr warning starting 10 days before a stored claude.ai sign-in ends. When it does end, the error now namesclaude auth loginandclaude setup-token. Useful for cron jobs: grep stderr or check the JSON field. - Mods:
$.model.forktakeseffort, so a quick side job can run atlowwhatever the session uses. What a mod attaches atprompt.submitnow stays in the user's turn instead of going out as a system message. Claude Code records your answer when it asks to turn on mods it wrote in a session. - Headless correctness:
claude -pand Agent SDK sessions no longer report success when an API error cut off a reply while a mod hookedturn.step; failing custom slash commands now print an error; a message sent right after a model change is cancelled by Stop. Unattended runs stop rewriting~/.claude.jsonwhen nothing changed, and a~/.claude.jsonthat is not valid JSON now fails the start with restore instructions instead of being replaced by defaults. - MCP: a call to a tool that is not loaded yet now returns its input schema;
claude mcp addandremovetake the config lock (or exit 1); stdio servers that exit on the version probe are no longer re-probed each start.deniedMcpServersURL entries now also block Anthropic-provided servers and cloud connectors whose upstream URL matches. - Background work: background subagents move a shell command to the background after 3 minutes on all providers, so the prompt cache does not expire while it runs.
- Gateway:
assume_roleonmantleupstreams for a role in another AWS account and per-developer AWS cost attribution. - Cloud sessions: a "No repository" option for Anthropic-hosted environments; the
built-in Chromium is reachable as
google-chromeand throughCHROME_PATH;gh run view --logworks. - Changed: Claude Code no longer installs or updates the IDE extension when started
in an IDE terminal (use
/ideor the editor's extensions view)./claude-api managed-agents-onboardgives new agents' built-in tools theautopermission policy by default. - Released alongside TypeScript Agent SDK 0.3.318 (see that note).
Why it matters
Scheduled and scripted Claude Code runs, like this library's own cron job, can now see a sign-in expiring before it breaks them, and several cases where a failed run looked successful are fixed.