[DOCS] Permission modes protected-path docs omit shell startup files and `~/.config/git/`

Open 💬 1 comment Opened Jun 2, 2026 by coygeek

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/permission-modes

Section/Topic

Protected paths

Current Documentation

The docs currently say:

Writes to a small set of paths are never auto-approved, in every mode except bypassPermissions. This prevents accidental corruption of repository state and Claude's own configuration. In default, acceptEdits, and plan these writes prompt; in auto they route to the classifier; in dontAsk they are denied; in bypassPermissions they are allowed. Protected directories: .git .vscode .idea .husky .cargo .claude, except for .claude/commands, .claude/agents, .claude/skills, and .claude/worktrees where Claude routinely creates content Protected files: .gitconfig, .gitmodules .bashrc, .bash_profile, .zshrc, .zprofile, .profile .ripgreprc .mcp.json, .claude.json

On the Claude directory page, the docs also say:

Claude Code adds this file to ~/.config/git/ignore the first time it writes one. If you use a custom core.excludesFile, add the pattern there too.

What's Wrong or Missing?

Claude Code v2.1.160 added prompts before writing .zshenv, .zlogin, .bash_login, and ~/.config/git/ because those writes can lead to unintended command execution, but the protected-path documentation does not mention those paths.

That leaves the current docs out of sync with actual prompt behavior:

A. The protected-file list is incomplete

Users reading permission-modes cannot tell that writes to .zshenv, .zlogin, and .bash_login now trigger the same protected-path prompt behavior as the already-listed shell config files.

B. ~/.config/git/ writes are undocumented as protected

The claude-directory page documents that Claude Code writes to ~/.config/git/ignore, but it does not mention that this write now prompts first.

Suggested Improvement

Update https://code.claude.com/docs/en/permission-modes so the Protected paths section explicitly includes the v2.1.160 additions:

  • .zshenv
  • .zlogin
  • .bash_login
  • ~/.config/git/ (or at minimum ~/.config/git/ignore if that is the intended documented scope)

Also add a short note explaining that these paths prompt before writes because modifying shell startup files or Git config files can cause unintended command execution.

On https://code.claude.com/docs/en/claude-directory, add a note near the ~/.config/git/ignore tip that the first write is now permission-gated/prompted in normal modes.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/permission-modes | 295-310 | Protected paths list omits .zshenv, .zlogin, .bash_login, and ~/.config/git/ |
| https://code.claude.com/docs/en/claude-directory | 148-150 | Documents a write to ~/.config/git/ignore but not that the write now prompts |

Total scope: 2 pages affected

Version context: Behavior changed in Claude Code v2.1.160.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗