[BUG] /init command ignores ./claude/settings.json permissions

Resolved 💬 1 comment Opened Apr 13, 2026 by itsalaidbacklife Closed May 24, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

/init command ignores permissions set in .claude/settings.json

When running /init in a repository with the following .claude/settings.json file, the generated CLAUDE.md file describes the contents of the .env* files e.g. what are the key environment variables.

Example .claude/settings.json file

{
  "permissions": {
    "deny": [
      "Read(./.env)",
      "Read(./.env.*)",
      "Read(./dist/*)"
    ]
  }
}

This should prevent claude from reading .env files altogether, but appears not to be doing so as /init will generate a CLAUDE.md file which describes the content of these files

What Should Happen?

/init should skip over reading any files blacklisted as denying read permissions in .claude/settings.json

Error Messages/Logs

Steps to Reproduce

  1. Take an existing project with any significant complexity and several .env, .env.development etc files in the root director
  2. Define the .claude/settings file as shown above
  3. run claude /init in the project root
  4. Allow claude to generate the CLAUDE.md file

Review the contents of the file and look for references to the .env file contents

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.92 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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