[Bug] Sandbox blocks uv cache access during pytest execution
Status Closed — not planned
Maintainer reply None cached
Activity 8 comments · opened Oct 24, 2025 · closed Feb 1, 2026
Bug Description
When using sandbox and uv together, running pytest fails because it cannot access $HOME/.cache/uv/sdists-v9/.git.
⏺ Bash(uv run pytest -v)
⎿ Error: error: failed to open file $HOME/.cache/uv/sdists-v9/.git: Operation not permitted (os error 1)
<sandbox_violations>
uv(9813) deny(1) file-write-data $HOME/.cache/uv/sdists-v9/.git
</sandbox_violations>
Environment Info
- Platform: darwin
- Terminal: ghostty
- Version: 2.0.26
- Feedback ID: 1c792d06-9b35-4f79-9656-056b857900f1
Errors
⏺ Bash(uv run pytest -v)
⎿ Error: error: failed to open file $HOME/.cache/uv/sdists-v9/.git: Operation not permitted (os error 1)
<sandbox_violations>
uv(9813) deny(1) file-write-data $HOME/.cache/uv/sdists-v9/.git
</sandbox_violations>
8 Comments
I have already added $HOME/.cache to add-dir.
Something weird happened to me:
What's going on?
The full edit:
```bash[/+]
⏺ Update(~/.claude/settings.json)[/+]
⎿ Updated ../../.claude/settings.json with 2 additions and 4 removals
2 "permissions": {
3 "allow": [
4 "WebFetch",
5 - "WebSearch"
5 + "WebSearch",
6 + "Edit(~/.cache/)"
7 ],
8 "deny": [
9 "Read(~/.aws/)",
...
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Hey, just adding that we are also running into this configuration limitation for subprocesses. It would be nice to be able to allow
.gitaccess (or I suppose.cache) outside the working directory and in sandbox, either explicitly or withignoreViolations. I verified this is still happening inv2.0.76.Would be nice to do something like (currently not honored)
Same here, please allow Claude code to respect Edit(/path/.git/**) as well
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.