Anthropic has published version 2.1.318 of Claude Code on GitHub. The release notes are long and focus mostly on reliability. The package covers saving configuration and login on shared network folders, the expiry of the claude.ai login, and the behavior of remote and non-interactive sessions. If you use the tool in a company or in automation, it is worth reading what has changed.
A few terms before we get into the facts. ~/.claude.json is the configuration file where Claude Code stores settings, trusted folders and MCP servers. MCP is the protocol the assistant uses to connect to external tools. claude -p is the non-interactive mode, used in scripts and automation. Mods are the extensions Claude Code writes during a session. Subagent is a secondary agent that works in parallel with the main one.
What is new in Claude Code 2.1.318?
According to the official notes on GitHub, the version records the user's response when Claude Code asks to enable mods written during a session. It also adds assume_role on the mantle upstreams of the Claude apps gateway, useful for assuming a role in another AWS account and for attributing AWS costs to each developer.
Mods also get an effort option for $.model.fork, so a fast secondary task can run at low effort regardless of the session. The result reports the effort sent.
How does login expiry management change?
claude auth status now shows the end date of the saved claude.ai login (loginExpiresAt). JSON results from claude -p report credential_expires_at. From 10 days before expiry, the text output of claude -p shows a one-line warning on stderr.
When the login expires, the error says so explicitly and, in claude -p, points to claude auth login and claude setup-token. For those who leave unattended jobs running, this is information that was previously missing.
Why is so much said about network home folders?
Many fixes concern shared network homes. The notes mention /logout, claude auth logout and claude mcp remove that reported success even when the file was not updated. Also fixed is the saved login being replaced by an empty file when the home has run out of space.
Other entries concern jobs exiting with Not logged in after a new login from another terminal, and claude mcp add and remove writing without a lock. They now wait or exit with code 1, although a save from another job can still overwrite a saved server.
For ~/.claude.json, an invalid file is no longer replaced by default values. Startup fails and explains how to restore it. If the file is empty and has no backup, Claude Code starts as if it were missing. Those who want the context can also read the 2.1.314 fixes.
What changes for sessions, subagents and security?
The notes fix the loss of conversation with --continue after failed tool call retries, a regression from 2.1.314. Also resolved is the freeze on macOS with many Bash commands, and permission prompts resolved by keys typed right after sending a message.
A command approved after restarting a self-hosted runner or a cloud session ran in the session's starting folder. Now, if the requested folder is not accessible, the command does not run. Moreover, deniedMcpServers with URLs also blocks the servers provided by Anthropic with a matching upstream.
Background subagents move a shell command to the background after 3 minutes on all providers, so the prompt cache does not expire. On Bedrock, Vertex, Foundry or without telemetry, with a cold cache, the wait can reach 5 minutes. For a comparison with the previous release there is 2.1.316.
Limits to know
The notes we were given are truncated, and the last entry, about the gateway, is incomplete. We have not verified any of the fixes in practice. Declared limits remain, for example a save from another job can still overwrite a saved MCP server. No performance impact measurements are reported.
What changes for those working with digital tools
If you use Claude Code in scripts or CI, check the login expiry with claude auth status and catch the warning on stderr. If your home directories sit on NFS or other shared folders, the update reduces the risk of emptied configurations or lost MCP servers. Those who manage company policies should review the deniedMcpServers rules, which are now broader. Those developing on the service may recall the case of the backdoored extension on Cursor, because 2.1.318 stops installing the IDE extension at startup from an IDE terminal.
Our take
It is an unassuming but useful release. Almost all entries are fixes for silent data loss or for successes reported without having been achieved, the kind of defect that costs hours in production. The flip side is that many problems tied to network homes and restarts come to light. For a tool used more and more in unattended ways, the robustness of saving login and configuration should be a baseline requirement, not a series of later patches.
Frequently asked questions
What does the new login expiry warning do?
It appears on stderr in the text output of claude -p, starting 10 days before the saved claude.ai login ends. The date is also visible in claude auth status. JSON results include the field credential_expires_at.
Does Claude Code 2.1.318 fix conversation loss with --continue?
Yes, for one specific case. The notes describe the previous conversation being lost after retries of a malformed tool call had ended. It was a regression introduced in 2.1.314.
What happens if ~/.claude.json is corrupted?
Non-interactive startup fails and explains how to restore the file, which is left as it is. Previously it was replaced with default values. An empty file without a backup is no longer reported as corrupted.
Does anything change for the IDE extension?
Yes. Claude Code no longer installs or updates the IDE extension when started from an IDE terminal. Use /ide from an external terminal or the extensions view of your editor.
Do subagents work differently?
Yes. Background ones move a shell command to the background after 3 minutes. They also stop, instead of switching model, if the option is set to Ask each time.
What to watch for in the next Claude Code releases
2.1.318 closes many defects but leaves some declared. The next release notes will show whether network homes stop causing problems.
- Read the next release notes looking for entries about locks and concurrent saving of MCP servers.
- Try the update on a test runner before rolling it out to the whole team.
- Check whether the expiry warning appears in your jobs and note the login end date.




