claude-code - 💡(How to fix) Fix [BUG] Bash tool bypasses configured working directory boundaries [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52392Fetched 2026-04-24 06:08:25
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5closed ×1commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Description:

Claude Code was configured with two working directories:

Primary: C:\code\evaluator Additional: C:\code\play\Ops\Application\playwright-tests Despite this, when Claude ran a find command targeting C:\code\play\Ops (a parent directory outside the configured scope), it executed successfully and returned results — with no permission prompt and no block.

The working directory configuration should enforce access boundaries at the system level, not rely on the model to self-restrict. A find or any other Bash command targeting a path outside the configured directories should be blocked or at minimum trigger a permission prompt.

Expected behavior: Bash commands targeting paths outside configured working directories are blocked or require explicit user approval.

Environment:

OS: Windows 11 Pro Shell: bash (Git Bash)

What Should Happen?

Actual behavior: The command executed freely and returned file listings from an unauthorized directory scope.

Error Messages/Logs

Steps to Reproduce

See bug report

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

Claude 1.3883.0 (93ff6c) 2026-04-21T17:24:01.000Z

Platform

Other

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be addressed by reconfiguring the working directories in Claude Code to properly enforce access boundaries at the system level.

Guidance

  • Review the current working directory configuration in Claude Code to ensure it accurately reflects the intended access boundaries.
  • Verify that the C:\code\play\Ops directory is not inadvertently included within the configured working directories.
  • Consider implementing an explicit permission prompt for commands targeting paths outside the configured directories as an additional security measure.
  • Test the find command with various paths to ensure the access boundaries are correctly enforced.

Example

No code snippet is provided as the issue is related to configuration and access control.

Notes

The issue may be related to how Claude Code handles directory traversal or permission checks. Further investigation into the configuration and implementation details of Claude Code's access control mechanisms is necessary to determine the root cause.

Recommendation

Apply workaround: Reconfigure the working directories and consider implementing explicit permission prompts for out-of-scope commands, as the root cause is likely related to the current configuration rather than a version-specific issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING