EPERM: Cannot read/write project-level .claude/ files from outside project directory
Resolved 💬 4 comments Opened Jan 25, 2026 by emregurhan Closed Feb 27, 2026
Bug Report
Environment
- Model: Claude Opus 4.5 (
claude-opus-4-5-20251101) - Platform: macOS (Darwin 25.3.0)
- Date: 2025-01-25
---
Description
When Claude Code is launched from a directory other than the project root (e.g. ~/), it scans and reports errors from project-level .claude/ directories (e.g. ~/Documents/GitHub/project/.claude/), but cannot read or write files in those directories due to EPERM: operation not permitted.
Reproduction
- Have a project at
~/Documents/GitHub/project/with a.claude/directory containingsettings.jsonandagents/*.md - Launch Claude Code from
~/(home directory) - Claude Code reports parse/validation errors for files inside the project's
.claude/directory - Attempting to read or edit those files returns
EPERM: operation not permitted
Observed Behavior
- Claude Code scans project-level
.claude/directories on startup - Reports errors (missing frontmatter, invalid schema, etc.)
- Cannot actually access the files to fix or even read them
- User is shown errors they cannot resolve within the current session
Expected Behavior
Either:
- Claude Code should have read/write access to
.claude/directories it scans and reports errors for, or - Claude Code should not scan/report errors for
.claude/directories it cannot access, or - The error output should clearly indicate that the file is outside the current session's permission scope
Related
- See also #20699 (multiple bugs including settings schema validation and agent frontmatter issues)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗