Choose where the agent works
Choose Git branches, directory copies or an empty workspace.
A workspace provides working files; a sandbox runs commands and agents. Choose the source according to the available files and how you want to collect changes.
Choose a source
Section titled “Choose a source”| Source | Use | Collect changes |
|---|---|---|
git | Existing repository, history and branches | Retain a branch or integrate its commits |
directory with copy | Process a directory while keeping its source intact | Publish selected files to a destination |
directory with mount | Expose the source under a declared subdirectory | Writable mounts change the source immediately |
ephemeral | Start with an empty root | Publish produced files or retain a snapshot |
Existing Git calls keep their defaults. Use createWorkspace() to open a declared source, workspaceSource to let a wrapper allocate the resource, or workspace to borrow an already open resource. Fileless callbacks, decisions and JSON workflows use the workflow engine directly.
Separate workspace and sandbox
Section titled “Separate workspace and sandbox”A workspace serves one sandbox at a time and can be reused after it closes. Close the sandbox before the workspace. A sandbox borrowing a workspace leaves its disposal to the caller; wrappers allocating their own resources manage their lifecycle. How it works explains this ownership.

