Source · release

Claude Code release 2.1.318

Author
Anthropic
Published
4 November 2026
Added
4 November 2026
Original
https://github.com/anthropics/claude-code/releases/tag/v2.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 status shows loginExpiresAt, claude -p JSON results include credential_expires_at, and claude -p text 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 names claude auth login and claude setup-token. Useful for cron jobs: grep stderr or check the JSON field.
  • Mods: $.model.fork takes effort, so a quick side job can run at low whatever the session uses. What a mod attaches at prompt.submit now 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 -p and Agent SDK sessions no longer report success when an API error cut off a reply while a mod hooked turn.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.json when nothing changed, and a ~/.claude.json that 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 add and remove take the config lock (or exit 1); stdio servers that exit on the version probe are no longer re-probed each start. deniedMcpServers URL 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_role on mantle upstreams 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-chrome and through CHROME_PATH; gh run view --log works.
  • Changed: Claude Code no longer installs or updates the IDE extension when started in an IDE terminal (use /ide or the editor's extensions view). /claude-api managed-agents-onboard gives new agents' built-in tools the auto permission 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.