Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tfy-sandbox-pwd-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@truefoundry/trueforge-core": patch
---

Add TFY sandbox agent instructions to discover the working directory via `pwd` before writing files.
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,9 @@ export class TFYSandboxProvider implements SandboxProvider {
getAdditionalInstructions(): string {
return dedent`
SANDBOX RULES:
- uploads, skills, and tool-results live in the sandbox working directory (not /tmp or /opt).
- ALL file creation and writes MUST stay within the sandbox working directory.
- The Agent's first sandbox command should be \`pwd\` to discover the working directory.
- uploads, skills, and tool-results live in that working directory (not /tmp or /opt).
- ALL file creation and writes MUST stay within that working directory.
- The Agent must NOT write to /tmp/, ~/, or any absolute path outside the working directory.
`;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ describe('TFYSandboxProvider layout', () => {
expect(install.remotePath.startsWith('/')).toBe(false);
expect(install.pathBinSymlink).toBeUndefined();
const instructions = provider.getAdditionalInstructions();
expect(instructions).toContain('uploads, skills, and tool-results live in the sandbox working directory');
expect(instructions).toContain(
"The Agent's first sandbox command should be `pwd` to discover the working directory.",
);
expect(instructions).toContain('uploads, skills, and tool-results live in that working directory');
expect(instructions).not.toContain('/data/sandboxes');
});

Expand Down
Loading