{"record":{"id":"b00b2156ce4bc3f2","repo":"paperclipai/paperclip","slug":"daytona-label-command-failed-exit-result-exi","errorCode":null,"errorMessage":"Daytona ${label} command failed (exit ${result.exitCode ?? \"unknown\"})${detail ? `: ${detail}` : \"\"}","messagePattern":"Daytona (.+?) command failed \\(exit (.+?)\\)(.+?)` : \"\"\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/daytona/src/file-sync.ts","lineNumber":314,"sourceCode":"    env: { ...process.env, COPYFILE_DISABLE: \"1\" },\n    maxBuffer: 32 * 1024 * 1024,\n  });\n}\n\nasync function countHostFiles(root: string, exclude?: string[]): Promise<number> {\n  const excludeSet = new Set(exclude ?? []);\n  let total = 0;\n  const walk = async (dir: string): Promise<void> => {\n    const entries = await fs.readdir(dir, { withFileTypes: true }).catch(() => []);\n    for (const entry of entries) {\n      if (excludeSet.has(entry.name)) continue;\n      const full = path.join(dir, entry.name);\n      if (entry.isDirectory()) {\n        await walk(full);\n      } else {\n        total += 1;\n      }\n    }\n  };\n  await walk(root).catch(() => undefined);\n  return total;\n}\n\n/**\n * Run one sandbox command and return its stdout on success. Throws the same\n * shaped error as {@link assertSandboxCommandOk} on a non-zero exit. Used by\n * the mkdir+zstd-probe round trip, which must read the probe's answer from\n * the command's own output rather than only checking the exit code.\n */\nasync function assertSandboxCommandOkWithOutput(\n  sandbox: Sandbox,\n  command: string,\n  timeoutSeconds: number,\n  label: string,\n): Promise<string> {\n  const result = await sandbox.process.executeCommand(command, undefined, undefined, timeoutSeconds);","sourceCodeStart":296,"sourceCodeEnd":332,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/plugins/sandbox-providers/daytona/src/file-sync.ts#L296-L332","documentation":"Exit-code check in assertSandboxCommandOk: a command executed inside the Daytona sandbox (e.g. tar/cleanup helpers around sync) returned a non-zero exit code (or timing out maps to non-zero), and its trimmed stdout/stderr is appended as detail. This converts a failed sandbox-side helper step into an aborting error for the enclosing sync operation.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/daytona/src/file-sync.ts:310 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the exit code and detail in the message; fix the remote command and retry."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}