Claude Code fixes a bug that could send the same tool action twice

Anthropic has fixed a problem in Claude Code that could make it send the same tool request twice. This could happen when an internet connection closed before an HTTP-based MCP tool request was finished. Now, Claude Code only tries sending a request again automatically if the tool is marked as safe to use more than once or only reads information without changing anything.

Claude Code's interface in a terminal window. Image: Anthropic
The fix is included in Claude Code version 2.1.307. This version also fixes problems with signing in, keeping cloud sessions saved, and showing permissions. The change fixes a specific problem with trying requests again. It does not change which actions an AI agent is allowed to perform.
Trying an interrupted action again is only safe for certain tools
MCP is a system that lets Claude Code connect to other tools and services. If the connection breaks while a tool is doing something, Claude Code might not know whether the tool already finished the request.

Claude Code running in a web browser. Image: Anthropic
Looking up information a second time is usually different from repeating an action that changes something. Anthropic now allows automatic retries of these HTTP requests only for tools that read information without changing it or are designed to give the same result when used more than once. The second type is called "idempotent." Using these tools again should not cause an extra change.
Anthropic's release notes do not say which services, if any, were affected by changes happening twice. They also do not say how often the problem happened. What is confirmed is that Claude Code now has stricter rules about when it can send the same tool request again.
Anthropic has already made earlier improvements to Claude Code's MCP connections. However, this new fix is for tools that connect through HTTP, not the separate connection method called stdio.

A Claude Code session reading computer code and writing a test. The update fixes problems with tool actions happening more than once. Image: Anthropic
Other fixes make connection problems and permissions easier to understand
On Mac computers, a locked login keychain could make MCP servers look as though they needed the user to sign in again. The login keychain is where macOS securely stores passwords and other sign-in information. Claude Code now explains when a locked keychain is causing the problem. After the user unlocks it, Claude Code can connect the next time it runs without asking the user to sign in again.
The update also fixes another connection problem on Mac and Linux computers. If a computer went to sleep while connecting to an MCP server, Claude Code could wrongly keep showing that the connection had failed, even after the computer woke up.
In cloud sessions or sessions hosted on a user's own server, a conversation deleted from the current session using the /clear command could sometimes come back after a restart. This problem has now been fixed. Claude Code has also improved the screen that shows recently denied permissions. It now displays the exact shell command that was denied. This helps users understand which command they are allowing when they try an action again.
