[BUG] Presence of CLAUDE.md file breaks CLI authentication on Team plan
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?
The presence of a CLAUDE.md file in a project directory causes Claude Code CLI to fail authentication on a Team Premium plan.
The welcome screen shows no organization name, no "Welcome back" message. Any prompt returns "Your account does not have access to Claude Code. Please run /login." Running /login says "Login successful" but the next prompt fails again in an infinite loop.
Removing the CLAUDE.md file immediately fixes the issue. Even a CLAUDE.md containing only "# Test" triggers the bug — file content doesn't matter, only its presence.
What Should Happen?
Claude Code CLI should authenticate normally and display the organization name (e.g. "Sonnet 4.6 · Claude API · OrgName") regardless of whether a CLAUDE.md file exists in the project directory. The CLAUDE.md file should only provide project instructions to the AI, not affect the authentication flow.
Error Messages/Logs
Steps to Reproduce
- Have a working Team Premium plan with Claude Code CLI access
- Create an empty directory and confirm CLI works:
mkdir test_empty && cd test_empty
claude
→ Shows "Welcome back Fred!" and "Sonnet 4.6 · Claude API · Tanaguru" ✅
- Create any CLAUDE.md file in that directory:
echo "# Test" > CLAUDE.md
claude
→ No welcome, no org name, shows only "Sonnet 4.6 · Claude API" ❌
→ First prompt returns "Your account does not have access to Claude Code"
- Remove it:
del CLAUDE.md
claude
→ Works again ✅
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
same one (other project)
Claude Code Version
2.1.101
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
- Windows 11, PowerShell, native installation
- Team Premium plan, Primary Owner role
- Same account works perfectly in projects without CLAUDE.md
- Tested with fresh git clone, no .claude/ directory, no .mcp.json, no git remote — only CLAUDE.md triggers the failure
- The CLAUDE.md file works fine when loaded via Claude Code Desktop (web/cloud)
- claude logout + claude login cycle: login succeeds but access fails on next prompt
- Cleared project config in ~/.claude.json, s1mAccessCache, githubRepoPaths — no effect
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗