sandbox_pull

sandbox_get plus the download: writes a file from the box to a local path, or unpacks a directory into it. Runs only through the stdio adapter.

Input Output
id, path, localPath, extract, clean (adapter only) ok, localPath, bytes, extracted, files, paths; when they apply, removed, removedPaths, changedWhileReading, notes

sandbox_pull (adapter only) is sandbox_get plus the download: it writes the file to localPath, or unpacks a directory's contents straight into it (extract: false keeps the tar.gz). path takes what sandbox_get takes: relative to /work (/work/... works too), or an absolute path under /tmp/ or /dev/shm/. An empty file comes back as an empty file, and a directory reached through a symlink comes back with its contents. Use it for what the box produced (go.mod after go mod tidy, a built dist, formatter output) instead of printing it and pasting it back. The local path is localPath (dest, as in sandbox_sync, is taken too). files counts what was written and paths lists the first 50.

Unpacking merges into what is already in localPath, so files you deleted on the box stay locally. "clean": true makes localPath exactly the box's directory: the archive is unpacked next to it first and swapped in only when that succeeds, and removed (with the first 20 removedPaths) counts the local files that went. clean is refused for a git checkout, your home directory, the adapter's working directory and the folders that hold them.

A directory something on the box is still writing (a background test run) comes back anyway, with the files that changed while it was packed in changedWhileReading: their copies may be partial, so pull again once the writer is done. The download reports progress, stops with an error after two minutes without data, and when the first download link is refused, fetches a fresh one once.


Every tool and topic is listed in the tool reference.