docs: say what a command meets at a secret #211
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "docs/sandbox-secret-masks"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A live check of Claude Code's sandbox on Linux, with this source's
settings, showed that a secret file fails more than reads. Writing,
deleting, or renaming one fails with
Permission deniedorDevice or resource busy, andls -lshows it as a character device,which looks like a damaged file.
git worktree remove --forceon aworktree that holds one fails after it has deleted the worktree's record
and part of its folder, and the same command then fails outside the
sandbox too. A committed example
.envfile shows as modified.The README named refused reads alone, so a developer or an agent who met
any of these had nothing to tell the sandbox's doing from a real fault.
A new item in the retry list was set aside, since that sentence already
lists eleven cases.
What changed
Hooks and settings gains one paragraph after the one on retries. The
README said that the sandbox refuses the secret files; it now also says
that on Linux each is a device file to a command that starts while it
exists, what reading, writing, deleting, and renaming it report, and
that a file a command creates stays readable until that command ends.
It says what a failed
git worktree remove --forceleaves behind, andthat
rm -rfoutside the sandbox removes the rest.It says that a committed example
.envfile shows as modified ingit statusinside the sandbox, with whatgit diffand a checkoutreport there.
The skills that remove a worktree stay as they are.
How to verify
On Linux, in a Claude Code session on a repository with these settings,
have Claude run a command that creates
.envin a git-ignored folder,then a second command that runs
catandrmon it.catreportsPermission deniedandrmreportsDevice or resource busy, as theparagraph says, and the
rmpasses when retried outside the sandbox.Checks on the tip, all passed:
bash tests/verify-agent-config.sh, 245tests outside the sandbox;
bash tests/check-work-folder.sh;.agents/hooks/shellcheck.sh repo;prettier --check '**/*.md';scripts/verify-agent-config.sh;git diff --check main. The changeadds no test. macOS and WSL2 were not tried, so the text speaks of Linux
alone.
Considerations
The paragraph adds about a hundred words to a section already longer
than a document section aims for. A review finding that asked the
paragraph to repeat "run it outside the sandbox" was set aside, since
the retry paragraph before it says so for every failed command.