You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
write/edit/read submit relative paths so absolute and ~ permission rules never match out-of-worktree files #41067
write, edit, and read pass file paths to the permission layer as path.relative(worktree, filePath). Files outside the worktree are therefore submitted as ../... patterns (e.g. ../.ssh/id_ed25519). Absolute and ~/$HOME-expanded permission rules such as "~/.ssh/**": "deny" never match those relative forms, so a deny rule can be bypassed when a tool edits an out-of-worktree file at a relative path.
Steps to reproduce
Configure a permission rule denying an absolute or ~-expanded path, e.g. "~/.ssh/**": "deny".
In a session whose worktree is not the home directory, attempt an edit/write/read on a file under that path via a relative /tools path.
Observe that the rule does not match the relative submission.
Expected
Rules match regardless of whether the tool passed the path as a relative ../ form, an absolute form, or a ~-expanded form.
If your report covers additional tools (e.g. read) or adds new reproduction details not present in #40945, please add a comment there so the maintainer has the full picture.
Activity
github-actions commentedon Aug 7, 2026
This issue might be a duplicate of existing issues. Please check:
edit/writetools submit worktree-relative paths to the permission layer, so absolute and~-expanded deny rules silently never match out-of-worktree files. That issue is already assigned and under active investigation.If your report covers additional tools (e.g.
read) or adds new reproduction details not present in #40945, please add a comment there so the maintainer has the full picture.Confine the agent with sandbox-exec, below the client (#54)
Stand the export where the model expects the repo to be (#54)
github-actions commentedon Oct 8, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.