anthropics / anthropics/claude-code
Session opens in Auto Mode despite permissions.defaultMode: "default" set globally in ~/.claude/settings.json
- 主要语言
- Python
- 星标
- 145k
- 派生
- 23.1k
- PR 合并指标
- PR 指标待抓取
描述
**Description:**
`~/.claude/settings.json` has `permissions.defaultMode` set to `"default"` globally (all projects/categories), set specifically to disable the auto-mode classifier after it repeatedly blocked approved actions with no way to grant permission conversationally (writing to a `.env` file, `systemctl restart`, `git push`, etc.).
Despite this, new sessions have opened in Auto Mode on multiple occasions (most recently 2026-09-07). Re-confirming/re-switching the setting from within an already-running session does not change that session's mode — it appears the mode is fixed at session start and the settings.json value isn't re-read afterward, but I have no way to confirm the exact mechanism.
**Expected:** Sessions should consistently start in `default` mode per the global setting, with no unexplained reversion to Auto Mode.
**Actual:** Auto Mode has activated on sessions after the global override was set, and there's no in-session action available to correct it once a session has already started that way.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start by reproducing the session-start behavior with permissions.defaultMode set to "default" in ~/.claude/settings.json, comparing new sessions with sessions where the setting is changed afterward. Trace how that file is loaded during session initialization and identify why Auto Mode can override the global value. Done means new sessions consistently honor the configured mode and a regression test covers the setting.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- authorization, cli
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 需要澄清
- 新手友好度
- 38/100