[Bug] Intermittent permission loss for project directories on macOS
Bug Description
I’m experiencing an intermittent permissions issue on macOS where Claude suddenly loses access to my ~/Documents folder, which is where my project repository is located.
The issue seems to happen randomly while I’m working, without me changing any macOS privacy or permission settings. When it happens, Claude can no longer read or modify files inside the project and reports that it does not have permission to access the Documents directory.
The strange part is that the permissions appear to recover after I completely close all terminal sessions and open the terminal again. After restarting the terminal, Claude can access the project normally without me changing any system settings.
It feels like the terminal process, or the process used by Claude, temporarily loses the macOS permission to access the Documents folder.
Steps / Behavior
Claude is working normally with a project located inside ~/Documents.
At some point, access to the folder suddenly stops working.
Claude can no longer read or write files in the project because of permission errors.
macOS permissions have not been manually changed.
I completely close all terminal windows/processes.
I reopen the terminal.
Access to ~/Documents works normally again.
Expected Behavior
Claude should retain access to the Documents folder for as long as the required macOS permissions are enabled.
Actual Behavior
Access to ~/Documents is occasionally lost during use and only starts working again after restarting the terminal.
Environment Info
Device: MacBook Pro
Platform: macOS (darwin)
Terminal: xterm-256color
Version: 2.1.259
Feedback ID: 260eb2a1-9d64-433b-9909-f44a71e911c0
Errors
[]
3 Comments
This matches a cluster of open macOS reports that include more diagnostics:
~/Documentsshortly after the auto-updater installs a newer version. Native installs put each release at its own path (~/.local/share/claude/versions/<version>), and macOS keys folder permissions for a standalone executable by its path, so every release looks like a new app. #49282 and #80899 describe the same root cause through repeated permission prompts.getcwdEPERM). Relaunching fixes it.tccdfails with "Failed to create Attribution Chain" and Documents access stays lost. One trigger was a command that deleted the shell's current directory.Knowing which one you hit would tell the maintainers which report this belongs with. Next time it happens, before restarting, these checks should show it:
/statuswithls -lt ~/.local/share/claude/versions. A version newer than the session points to #88576. The native installer keeps only a few recent versions, so a long session can also be running a binary that has since been deleted.logbuiltin:``
sh
`/usr/bin/log show --last 30m --style compact --predicate '(process == "tccd" OR process == "sandboxd" OR process == "kernel") AND (eventMessage CONTAINS[c] "Documents" OR eventMessage CONTAINS "Attribution Chain" OR eventMessage CONTAINS "deny(1) file-read-data")'
deny(1) file-read-data …/DocumentsA
line names the process that was denied.Failed to create Attribution Chain` points to #90227./sandbox)? Did a command just remove the shell's working directory, such as a worktree or a temp folder?It would also help to know which terminal app you use, and whether Claude Code came from the native installer or npm.
Workarounds until there's a fix:
~/Documents,~/Desktopand~/Downloads, the folders macOS protects this way."env": {"DISABLE_AUTOUPDATER": "1"}in~/.claude/settings.json, and runclaude updatebetween sessions.Im having the same issue exactly, for more than 2 months now, i have this issue on two different laptop, m1 and m5max on macOS 26.5, iTerm2
When it happens i can't even "ls" in the folder.. through iterm, and it is caused by claude for sure.. i actually have a markdown research of claude on why that happened on my laptop
Lately it has been happening more and more
@thepixelabs thanks, "even
lsfails in iTerm2" is a useful detail. It matches #87061, where the kernel log showed a plainlsdenied along with Claude Code (System Policy: ls(57439) deny(1) file-read-data …/Documents), and only quitting the terminal fixed it. That report was auto-closed for inactivity two days ago, so this issue is now the open one for this pattern.When it next happens, before you restart anything, these would help narrow it down:
lsfail? Runls ~/Documentsin the tab where Claude Code was running (after exiting it), and again in a brand-new iTerm2 tab. If only the old tab fails, access is lost for that one process tree. If the new tab fails too, iTerm2 as a whole has lost access.tccdlog from the moment it breaks. Use the full path, because zsh'slogbuiltin shadows the real command:``
sh
`/usr/bin/log show --last 30m --style compact --predicate '(process == "tccd" OR process == "sandboxd" OR process == "kernel") AND (eventMessage CONTAINS[c] "Documents" OR eventMessage CONTAINS "Attribution Chain" OR eventMessage CONTAINS "deny(1) file-read-data")'
deny(1)` lines name the processes that were denied.The
/sandbox), and whetherls -lt ~/.local/share/claude/versionsshows an update installed during the session.If you can share the markdown research with usernames and paths removed, please add it here too. Findings from two different Macs would help the maintainers reproduce it.