paperclipai/paperclip · error · Error
Sandbox callback bridge response write wrote invalid result…
Error message
Sandbox callback bridge response write wrote invalid result JSON: ${error instanceof Error ? error.message : String(error)} What it means
Protocol-parsing failure when writing a bridge response: the atomic write shell script succeeded, but its stdout ('{"wrote":...}') failed to parse as JSON — the remote shell produced unexpected output — so the write result cannot be confirmed.
Solutions
- Inspect the write error and retry; the result JSON write failed.
- Check disk space and permissions in the bridge queue directory.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at packages/adapter-utils/src/sandbox-callback-bridge.ts:677 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-08-18).
Data as JSON: /api/errors/cb687ca84bd95425.
Report an issue: GitHub.
Appendix: source
Thrown at packages/adapter-utils/src/sandbox-callback-bridge.ts:766
" exit 0",
"fi",
"cat > \"$temp_path\"",
"mv \"$temp_path\" \"$response_path\"",
"printf '{\"wrote\":true}\\n'",
].join("\n"),
timeoutMs,
shellCommand,
body,
);
requireSuccessfulResult(`write bridge response ${responsePath}`, result);
try {
return {
wrote: JSON.parse(result.stdout.trim())?.wrote === true,
};
} catch (error) {
throw new Error(
`Sandbox callback bridge response write wrote invalid result JSON: ${error instanceof Error ? error.message : String(error)}`,
);
}
},
rename: async (fromPath, toPath) => {
await runChecked(
`rename ${fromPath}`,
`mkdir -p ${shellQuote(path.posix.dirname(toPath))} && mv ${shellQuote(fromPath)} ${shellQuote(toPath)}`,
);
},
remove: async (remotePath) => {
await runChecked(`remove ${remotePath}`, `rm -rf ${shellQuote(remotePath)}`);
},
};
}
async function writeBridgeResponse(
client: SandboxCallbackBridgeQueueClient,
requestPath: string,
responsePath: string,View on GitHub (pinned to 3f1d897a7c)