After upgrade Claude code keeps trying to read outside the working directory
Status Open
Reported on v2.1.277
Maintainer reply None cached
Activity 0 comments · opened Sep 29, 2026
Bug Description
After upgrade Claude code keeps trying to read outside the working directory.
Eg ~/.claude/feedback/drafts/98526ce3-0af6-4f8b-a97e-b0a45f6e1840.json
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.277
- Feedback ID: 96eaaa45-500e-4ead-9908-2ecff7cfc2b2
Errors
{
"draft_id": "98526ce3-0af6-4f8b-a97e-b0a45f6e1840",
"created_at": "2026-09-29T19:04:14.276Z",
"source_session_id": "2914d8f6-d200-45a7-9aed-c2a01f17b204",
"cwd": "/Users/jonas/source/vinpressen",
"model": "claude-sonnet-5",
"cli_version": "2.1.277",
"os": "darwin arm64",
"request_ids": [
"req_011CfYE4cxJx6BnzHPiGb4CG",
"req_011CfYExh7HvfD8cLJq5vD51",
"req_011CfYFLDXEE8Q6HFa3yF1ej"
],
"type": "bug",
"title": "Bash tool calls inconsistently blocked by outside-working-directory check after client upgrade",
"details": "**What happened:** Multiple Bash tool calls were rejected/blocked under what looked like the outside-working-directory sandbox check, with no stable command property explaining the pattern. A plain `sed` command touching only two files under `work/tekst/` (no Python, no external paths) was rejected. Meanwhile `work/venv/bin/python3 work/scripts/<script>.py <args>` calls of identical shape succeeded repeatedly both before and after the rejections, using the project's own venv. One early instance did surface an explicit `permissions.blockReadsOutsideWorkingDirectories` message (from a Read tool call on a path under /tmp), but subsequent rejections gave no such detail, just a generic \"user doesn't want to proceed.\"\n\n**What the user said:** \"Jeg har stoppet hver gang du har sendt mig denne 'permissions.blockReadsOutsideWorkingDirectories' da det ser ud til at være et seriøst tillidsbrud. Det underlige er at du har lavet flere årgange uden at det gav problem.\" Also: \"jeg kørte en opgradering af Claude her i dag og faktisk også i går er der noget i disse som giver problemer?\" (ran a Claude Code upgrade today and yesterday, suspects it's related).\n\n**Repro:** Long-running project session with a repo-local Python venv (work/venv). Ran many `work/venv/bin/python3 work/scripts/X.py args` invocations successfully for an extended period (text extraction, figure cropping via PyMuPDF). Partway through the same session, functionally identical invocations - and even a Python-free `sed` command - began triggering rejection under the working-directory permission check, with no change in command shape or target paths (all remained inside the project directory).\n\n**Evidence:** Project working directory ~/source/vinpressen. Occurred same-day as, and the day after, a Claude Code client upgrade per the user.\n\n**Cause:** Not verified in-session - user's working hypothesis is a regression from the recent client upgrade; I could not inspect the permission/sandbox internals to confirm.\n\n**Alternate hypothesis (added in a follow-up session, also unverified):** the user asked whether the rejections could instead relate to ~/.claude not being an allowed working directory. Corroborating observation from that follow-up session: a plain Read of a file under ~/.claude/feedback/drafts/ (this very draft) was blocked by the same permissions.blockReadsOutsideWorkingDirectories check, and was only resolved by explicitly running /add-dir ~/.claude. This shows the same permission class can legitimately fire on Claude Code's own internal directories (settings/feedback), not just arbitrary external paths - raising the possibility that some of the original session's \"inconsistent\" rejections on project-local commands were adjacent to, or confused with, blocked access to ~/.claude (e.g. for settings or feedback writes) rather than a pure regression in the project-directory sandbox check itself. Still not confirmed against sandbox internals.\n\n**Separately, a model-behavior issue in the same session:** when the rejections started, I proposed four different unverified root causes in succession (a `/tmp` output path, `source activate` vs. invoking the venv Python directly, inline `python3 -c` vs. a saved script file, then `dangerouslyDisableSandbox`), asserting each fix as if it addressed the cause, without owning that the pattern didn't actually correlate with any of them until the user pushed back and pointed out I was \"going in circles.\" I should have flagged the inconsistency and asked directly after the second failed theory instead of continuing to guess.",
"area": "Bash tool / sandbox permissions",
"failure_mode": "overconfidence_and_hallucination",
"task_category": "shell",
"trigger": "model_judgment",
"effort": "high",
"thinking_type": "adaptive",
"message_count": 1066,
"assistant_turn_count": 260,
"subagent_count": 0,
"transcript_ref": {
"session_file": "/Users/jonas/.claude/projects/-Users-jonas-source-vinpressen/2914d8f6-d200-45a7-9aed-c2a01f17b204.jsonl",
"message_range": null,
"project_dir_key": "-Users-jonas-source-vinpressen"
},
"status": "queued"
}