/v2/agents/sessions/{session_id}/workspace/downloadDownload a file or tar archive from the session's sandbox workspace.
Streams the workspace payload back as application/octet-stream using chunked transfer encoding, followed by a fixed integrity footer.
Response body layout: <payload> + <footer>, where the footer is exactly 73 bytes: DOWSSHA1 (8 bytes) + 64-char lowercase SHA-256 hex + \n. The client MUST strip the trailing 73 bytes before saving, verify SHA-256(payload) equals the footer digest, and treat a tail that does not match this shape (magic + 64 hex + newline) as a failed (truncated/corrupt) transfer.
Other metadata:
X-Workspace-Is-Archive: truewhen the payload is a tar archive.X-Workspace-Size-Bytesis a progress hint (not Content-Length) and excludes the footer.- The
X-Content-Sha256trailer also carries the digest but is best-effort: edge proxies may strip HTTP trailers, so the body footer is authoritative.
Concurrent transfers (upload + download) are capped server-side; over the cap the request blocks and may return 503.
A 400 is returned: Missing path, invalid query parameter, or invalid path. A 401 is returned: Authentication failed due to invalid credentials. A 403 is returned: Path resolves outside the workspace, or the session belongs to another team. A 404 is returned: The resource was not found. A 409 is returned: Session has no sandbox, or the sandbox is not ready. A 423 is returned: This session is unavailable; contact support. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. A 501 is returned: Workspace file transfer is not supported by the active sandbox driver. A 502 is returned: Upstream sandbox transfer failed. A 503 is returned: Workspace transfer capacity exhausted; retry later. Any other status is an error: There was an unexpected error.