{"record":{"id":"c83986bfaf6805f1","repo":"paperclipai/paperclip","slug":"failed-to-start-sandbox-acp-process-session-bridge","errorCode":null,"errorMessage":"Failed to start sandbox ACP process session bridge: ${startResult.stderr || startResult.stdout}","messagePattern":"Failed to start sandbox ACP process session bridge: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/adapter-utils/src/execution-target.ts","lineNumber":1863,"sourceCode":"// before it removes `sessionDir` unconditionally. The wrapper writes the\n// acknowledgement right after it arms its own kill timer, well before its\n// child actually exits, so this budget only needs to cover message delivery,\n// not the child's full shutdown.\nconst DEFAULT_PROCESS_SESSION_SHUTDOWN_WAIT_MS = 3_000;\n\nfunction jsonLine(value: unknown): string {\n  return `${JSON.stringify(value)}\\n`;\n}\n\nfunction splitJsonLines(buffer: string): { lines: string[]; rest: string } {\n  const parts = buffer.split(/\\n/);\n  return { lines: parts.slice(0, -1), rest: parts.at(-1) ?? \"\" };\n}\n\nasync function writeProcessSessionProxyScript(dir: string, port: number, token: string): Promise<string> {\n  await fs.mkdir(dir, { recursive: true });\n  const proxyPath = path.join(dir, PROCESS_SESSION_PROXY_SCRIPT);\n  await fs.writeFile(proxyPath, getProcessSessionProxySource({ port, token }), { mode: 0o700 });\n  return proxyPath;\n}\n\n// Content-hash-skip the process-session remote script write, mirroring the\n// sandbox callback bridge entrypoint sha256 gate. The script is a static\n// Paperclip-authored `.mjs` that only changes when the build changes, so on a\n// warm start (same sandbox, script already present) the single sha-gate exec\n// skips the ~3-exec base64 upload entirely. `syncRemoteTextFileWithHashSkip`\n// fails loud on a check error rather than silently re-uploading.\nasync function syncProcessSessionRemoteScript(input: {\n  runner: CommandManagedRuntimeRunner;\n  remoteCwd: string;\n  remoteScriptDir: string;\n  remoteScriptPath: string;\n  timeoutMs?: number | null;\n  shellCommand?: \"bash\" | \"sh\" | null;\n  outputToStdout?: boolean;\n}): Promise<{ uploaded: boolean }> {","sourceCodeStart":1845,"sourceCodeEnd":1881,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/adapter-utils/src/execution-target.ts#L1845-L1881","documentation":"Bridge-launch failure in sandbox ACP mode: the nohup'd node wrapper that hosts the process-session bridge failed to start (its launch command reported an error on stderr/stdout), so no ACP session can be established with the sandbox.","triggerScenarios":"Thrown at packages/adapter-utils/src/execution-target.ts:1567 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the bridge start output in the error and fix the cause (missing deps, port conflicts).","Verify the sandbox image contains the ACP process session bridge binary."],"exampleFix":null,"handlingStrategy":"retry","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"}