paperclipai/paperclip · error

Daytona syncOut download failed for ${entry.source}: ${respo

Error message

Daytona syncOut download failed for ${entry.source}: ${response?.error ?? "no response returned"}

What it means

Thrown during syncOut finalization when the Daytona fs.downloadFiles batch response for a file entry is missing or carries an `.error`. Per-file failures surface in `.error` rather than a thrown batch, so the loop fails loud on the first missing/errored response, reporting the original sourcePath.

Source

Thrown at packages/plugins/sandbox-providers/daytona/src/file-sync.ts:856

  let responses: FileDownloadResponse[];
  try {
    // One batched bulk download for all file mappings, reading the snapshots.
    responses = await sandbox.fs.downloadFiles(requests, timeoutSeconds);
  } catch (error) {
    await cleanup();
    throw error;
  }

  // Per-file failures surface in `.error`, not a thrown batch — fail loud on any.
  // Responses are keyed by the (snapshot) request source; report the original
  // sourcePath in the surfaced error for a caller-meaningful message.
  const bySource = new Map(responses.map((response) => [response.source, response]));
  for (const entry of finalize) {
    const response = bySource.get(entry.snapshot);
    if (!response || response.error) {
      await cleanup();
      throw new Error(
        `Daytona syncOut download failed for ${entry.source}: ${response?.error ?? "no response returned"}`,
      );
    }
  }

  let bytesTransferred = 0;
  try {
    for (const entry of finalize) {
      // chmod the temp before the rename so the target never appears at a widened
      // window; rename preserves the inode's mode.
      if (typeof entry.mode === "number") {
        await fs.chmod(entry.temp, entry.mode);
      }
      bytesTransferred += (await fs.stat(entry.temp)).size;
      await fs.rename(entry.temp, entry.target);
    }
  } catch (error) {
    await cleanup();

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. Inspect entry.source and the response.error in the message to identify the failing file.
  2. Ensure source files exist and are readable in the sandbox at download time (avoid concurrent sandbox mutations during syncOut).
  3. Retry the syncOut operation for transient Daytona/network errors.
  4. If a file is legitimately absent, exclude it from the sync mapping or ensure it is created before sync.
Defensive patterns

Strategy: retry

Try / catch

try {
  await syncOutFile(...);
} catch (e) {
  if (e instanceof Error && e.message.includes('syncOut download failed')) {
    // verify source exists in sandbox; retry once for transient Daytona errors
  }
  throw e;
}

Prevention

When it happens

Trigger: A syncOut download of individual files returns a responses array where, for some entry.snapshot, either no matching response exists or response.error is set. The temp file is cleaned up before throwing.

Common situations: The source file was deleted in the sandbox between snapshot and download; Daytona API transient error downloading a specific file; permission denied reading the file; network interruption; the snapshot key mismatch between request and response.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/1e11e6cf99dc2415. Report an issue: GitHub.