---
title: "[Bug] \"Allow always\" saves full command text leaking secrets and causing parse errors · Issue #24994 · anthropics/claude-code · GitHub"
url: "https://xlrocket.men/bug-allow-always-saves-full-command-text-leaking-secrets-and-causing-parse-errors-issue-24994-anthropics-claude-code-github"
markdown_url: "https://xlrocket.men/bug-allow-always-saves-full-command-text-leaking-secrets-and-causing-parse-errors-issue-24994-anthropics-claude-code-github.md"
format: "link"
published: "2026-10-31T12:21:43.000Z"
link_url: "https://github.com/anthropics/claude-code/issues/24994"
site: "火箭君 MEN"
---

# [[Bug] "Allow always" saves full command text leaking secrets and causing parse errors · Issue #24994 · anthropics/claude-code · GitHub](https://github.com/anthropics/claude-code/issues/24994)

译：Claude Code「Always allow」会把整段命令（含 API key）写进 `.claude/settings.local.json`，可能跟着 npm 包泄漏

- 所有权/回滚：发布前 `npm pack --dry-run` 查有没有 `.claude/`
- 泄漏立刻轮换密钥；`.gitignore` / `.npmignore` 挡一层
- [排查说明](https://outloop.co/learn/claude-code-stores-api-keys)
