Repository navigation
feat: teach agents on a sandbox to keep files out of /tmp - #19
Merged
OmarAlex24 merged 1 commit intoNov 11, 2026
Merged
Conversation
A sandbox's /tmp is emptied on every stop, and agents kept putting screenshots, drafts, logs and extra worktrees there. Every sandbox's Claude now gets a built-in t3-sandbox-files skill: the launch writes it whether or not the config copies any skills, and a resume adds it when it is missing. A failure to write it is only a warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OmarAlex24
merged this pull request
into
feat/sandbox-environments
Nov 11, 2026
8 of 20 checks passed
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.
Problem
A sandbox's
/tmpis emptied every time it stops and resumes. Agents kept saving screenshots, drafts, logs and extra git worktrees there, and lost them. An image embedded in a reply from/tmpbroke for the user after the next stop.Solution
The host installs a built-in Claude skill,
t3-sandbox-files, in every sandbox. It says to save anything needed later under$HOME, in an existing work folder or~/scratch/<task>/, never in/tmp. Its description names the moments an agent reaches for/tmp, so Claude loads it then.SANDBOX_FILES_SKILLinapps/server/src/sandbox/sandboxSetup.ts.SKILL.mdis missing, and beforet3 servestarts. That way existing sandboxes get it, and a queued message's first Claude session already sees it.docs/user/remote-access.mdanddocs/internals/sandbox-environments.mddescribe it.Known limitations
agentSkilllimit, which raises the bridge's resume wait from 900 to 930 seconds.Test plan
sandboxSetup.test.ts, in a temporary home:Also in
sandboxSetup.test.ts: the skill's name and the triggers in its descriptionSandboxProvisioner.test.ts:t3 serve.These tests fail without the change.
sandbox.test.ts(contracts): the resume wait still outlasts every stepvp run check:changed origin/feat/sandbox-environmentson this branch: format, lint, knip, graphql, typecheck (38 packages) and React compiler pass. 818 of 819 tests pass; the one failure,sandboxSetup.test.ts > tailscaleScript > falls back to userspace, joins with the key as a 0600 file, and the scrub logs out, fails onfeat/sandbox-environmentstoo.🤖 Generated with Claude Code