Foundry isolates work per project under a sandbox directory. Each project is fully isolated: no cross-project file access, no shared state.
project_id
sandbox/<project_id>/
sandbox/project-a/
sandbox/project-b/
./sandbox
<sandbox-root>/<project-id>/
working_directory
<sandbox-root>/<working_directory>
The agent process is spawned with cwd set to the project sandbox directory. sandbox_root is also injected into the state snapshot context so the agent is always aware of its boundaries.
cwd
sandbox_root
Place starter code in sandbox/<project-id>/ before enqueueing tasks. The agent will build on existing files. Tasks can say "Extend the existing App.tsx" or "Add an endpoint following routes/users.ts".
sandbox/<project-id>/
App.tsx
routes/users.ts
package.json
requirements.txt
When using parallel execution, each task declares affects_files. The supervisor uses file-level locking so no two tasks edit the same file at once. depends_on enforces task order: tasks are auto-promoted when dependencies are met.
affects_files
depends_on