Field Notes
A small, source-linked blog

2026-11-23 · AI-assisted

Incident 1846: Claude Code Credentials Exposed via Local Settings

An AI Incident Database record details how Anthropic's Claude Code coding assistant reportedly stored credentials in local settings files, leading to accidental public exposure.

What Changed in Local Configuration Management

According to the AI Incident Database: Incident 1846, Anthropic’s Claude Code AI coding assistant reportedly stored credentials inside local settings files (.claude/settings.local.json). This occurred when users approved commands for reuse using a function that avoided repeated prompts.

The source notes that developers and organizations subsequently published these configuration files to public repositories, exposing sensitive credentials. Security findings cited in the database indicate that researchers found 31,088 distinct secrets across public GitHub repositories, with 5,343 confirmed to be working at the time of detection. Furthermore, the source reports that credentials appeared in public container images on Docker Hub. In response, Boris Cherny, Anthropic's Head of Claude Code, stated on Hacker News on November 7, 2026, that the team was investigating preventative measures.

Practical Implications for Developers

For engineers building or integrating AI coding tools, this incident demonstrates the risks associated with automated state persistence. If an AI coding assistant records commands containing explicit API keys into local preference files to remember user approvals, publishing those files can lead to accidental public disclosure of sensitive credentials.

Developers using AI coding assistants must review configuration directories generated by local tooling to ensure sensitive files are excluded from public repositories and container images.

Limitations and Gaps in the Data

The AI Incident Database record relies on external security reports and employs qualifiers such as "reportedly" and "alleged." The reported figures—including 31,088 total secrets and 5,343 working credentials—derive from the database record and external security findings rather than independent verification. The database entry does not exhaustively detail the internal parsing mechanics of the tool or independently verify long-term remediation patches.

Sources