fix(tool-sandbox): skip missing fs_write_file grants instead of denying - #1452
Merged
lukehinds merged 1 commit intoJul 24, 2026
Merged
Conversation
Contributor
PR Review SummarySize
Affected crates
Blast radius — ContainedThis PR touches: source code Updated automatically on each push to this PR. |
kipz
force-pushed
the
kipz/tool-sandbox-fs-write-file-missing
branch
from
July 20, 2026 10:56
4db7096 to
4c32bb7
Compare
kipz
marked this pull request as ready for review
July 20, 2026 10:59
kipz
added a commit
to kipz/nono
that referenced
this pull request
Jul 20, 2026
…e grants instead of denying
kipz
added a commit
to kipz/nono
that referenced
this pull request
Jul 20, 2026
…e grants instead of denying
kipz
added a commit
to kipz/nono
that referenced
this pull request
Jul 20, 2026
…e grants instead of denying
kipz
added a commit
to kipz/nono
that referenced
this pull request
Jul 20, 2026
…e grants instead of denying
kipz
added a commit
to kipz/nono
that referenced
this pull request
Jul 21, 2026
kipz
added a commit
to kipz/nono
that referenced
this pull request
Jul 21, 2026
Signed-off-by: James Carnegie <me@kipz.org>
kipz
force-pushed
the
kipz/tool-sandbox-fs-write-file-missing
branch
from
July 21, 2026 17:12
4c32bb7 to
d02dad9
Compare
kipz
added a commit
to kipz/nono
that referenced
this pull request
Jul 21, 2026
…e grants instead of denying
kipz
added a commit
to kipz/nono
that referenced
this pull request
Jul 23, 2026
…e grants instead of denying
Contributor
|
all good thanks @kipz ! |
lukehinds
approved these changes
Jul 24, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked Issue
Closes #1450
Summary
A per-command
fs_write_filegrant for a missing path denied the wholesandboxed command, unlike the sibling
fs_read/fs_write/fs_read_filegrants which already skip missing paths. Adds a shared
add_optional_write_filehelper (intool-sandbox/mod.rs, alongside theexisting
agent_can_write/lexically_normalizeshared helpers) matchingthat existing pattern, called from both the macOS and Linux platform
implementations instead of each defining its own copy.
Agent Disclosure
Authored by an AI coding agent on behalf of @kipz. Consulted
tool-sandbox/platform/{macos,linux}.rs(add_policy_fsand itsadd_optional_*siblings) andcapability.rs/capability_ext.rstoconfirm this path lacks the missing-file tolerance the top-level session
sandbox already has. Disclosed on the linked issue before opening this PR.
Test Plan
make ci— clean.add_optional_write_file_tests(missing path is skipped, existingpath is granted) — both pass.
repro: denial is gone, command proceeds past sandbox construction.
Checklist
CHANGELOG.mdif neededAgent Compliance Check (Required for AI/Automated PRs)