Recommendations for Developers and Security Teams
In light of these findings, security experts are urging developers to rethink how they interact with AI coding assistants. The primary advice for those using Claude Code is to be extremely cautious when using the "don’t ask again" feature for any command that requires authentication.
If a developer suspects that a secret has been saved in a .claude settings file, the recommended course of action is not just to delete the file, but to "rotate" the credentials immediately. This involves changing every password, token, or key that has ever been recorded in the file. Once the secrets themselves are invalidated, the developer should then work to scrub the Git history using specialized tools to ensure that the information is removed from all previous commits and forks.
For organizations and security teams, the researchers suggest a more proactive approach. This includes:
- Implementing strict policies regarding the use of AI coding agents and the automation of shell commands.
- Updating internal security scanners to specifically look for
.claude/settings.local.jsonand.claude/settings.jsonfiles. - Ensuring that project-level
.gitignorefiles are updated to explicitly exclude the.claude/directory across all repositories. - Monitoring for "co-authored" commits by AI agents to ensure that configuration files are not being pushed to remote servers.
The researchers also noted that while Claude Code is the most prominent example of this behavior, it is not the only AI tool that developers use. However, in a comparison of 16 different coding agents, Claude Code was the only one confirmed to save the full text of approved commands in a project-level configuration file by default.

A History of Unaddressed Warnings
Perhaps the most frustrating element of this security lapse is that it was not unknown to the developer community. Users of Claude Code have been raising alarms about this specific behavior for months. A bug report was filed on the official Claude Code GitHub repository as early as August 11, 2025, explicitly stating that API keys and tokens were being stored in plain text within the settings.local.json file.
Despite the clear risk outlined in the report, the issue did not receive a formal response from Anthropic. Instead, the report was automatically closed by a bot in early January 2026 after 60 days of inactivity, marked as "not planned." Three other related reports cited by the researchers met a similar fate, with the most recent being closed just yesterday.
This lack of engagement from the tool’s developers has drawn criticism from the security community. As AI companies push for deeper integration into the developer’s environment, there is an expectation that security reports regarding the core functionality of these tools will be prioritized. The silence from Anthropic, combined with the automated closure of high-risk security reports, suggests a potential gap in the oversight of AI-assisted development tools.
As of the time of publication, the vulnerability remains a functional part of the Claude Code ecosystem. Developers are encouraged to manually audit their .claude directories and treat any automated command history as a potential source of data leakage until a more robust, secure permission model is implemented by the manufacturer.
