paperclipai/paperclip · error
CreateOS process exit status is missing.
Error message
CreateOS process exit status is missing.
What it means
The process stream delivered an `exit` event that contained neither a valid integer `exit_code` nor a `signal` string matching /^SIG[A-Z0-9]+$/. Without one of these the completion status is unknowable, so the plugin refuses to fabricate a result.
Solutions
- Capture the raw exit frame and diff it against the documented exit-event schema.
- Pin the CreateOS service version to one matching the plugin's expected protocol.
- Check for intermediaries rewriting or filtering event fields.
- Re-run the command; note cleanup will terminate the unfinished process tree, so a rerun is safe.
Example fix
// before
{ "type": "exit", "status": "done" }
// after
{ "type": "exit", "exit_code": 0 } // or { "type": "exit", "signal": "SIGKILL" } Defensive patterns
Strategy: type-guard
Type guard
function hasExitStatus(e: Record<string, unknown>): boolean {
const code = e.exit_code, sig = e.signal;
return (typeof code === "number" && Number.isInteger(code))
|| (typeof sig === "string" && /^SIG[A-Z0-9]+$/.test(sig));
} Try / catch
try { const r = await execute(client, params, signal); }
catch (e) {
if (e instanceof Error && e.message === "CreateOS process exit status is missing.") {
// exit frame malformed: re-run; cleanup has already terminated the tree
} else throw e;
} Prevention
- Keep exit-event field names (exit_code/signal) synchronized across service versions.
- Block intermediaries that strip or rename event fields.
- Validate the exit-event schema in integration tests.
- Re-run commands rather than guessing an exit status.
When it happens
Trigger: CreateOS emits {"type":"exit"} with missing/null exit_code and signal, a float exit_code, or a malformed signal name; a protocol change renames these fields.
Common situations: CreateOS version upgrade renaming exit fields; server crash while finalizing process exit; proxy stripping unknown fields from event JSON.
Understand the failure class
Background: "invalid response format", "malformed payload", "missing data field": when an API returns 200 but the response shape is wrong — this error's family across 23 libraries.
Related errors
- CreateOS process output has a sequence gap.
- CreateOS process output is invalid.
- CreateOS process sequence is invalid.
- CreateOS returned an invalid process frame.
- Photon attachment header is missing
AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-09-18).
Data as JSON: /api/errors/c8e3c10ab10fb1be.
Report an issue: GitHub.
Appendix: source
Thrown at packages/plugins/sandbox-providers/createos/src/execute.ts:169
if (event.type === "heartbeat") continue;
if (event.type === "data") {
const seq = event.seq;
if (typeof seq !== "number" || !Number.isSafeInteger(seq) || seq < 1) throw new Error("CreateOS process sequence is invalid.");
if (seq <= cursor) continue;
if (seq !== cursor + 1) throw new Error("CreateOS process output has a sequence gap.");
if ((event.stream !== "stdout" && event.stream !== "stderr") ||
typeof event.data_base64 !== "string" ||
!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(event.data_base64)) {
throw new Error("CreateOS process output is invalid.");
}
output.write(event.stream, Buffer.from(event.data_base64, "base64"));
cursor = seq;
} else if (event.type === "exit") {
const exitCode = event.exit_code;
const exitSignal = event.signal;
if (!(typeof exitCode === "number" && Number.isInteger(exitCode)) &&
!(typeof exitSignal === "string" && /^SIG[A-Z0-9]+$/.test(exitSignal))) {
throw new Error("CreateOS process exit status is missing.");
}
completed = true;
output.finish();
return {
exitCode: typeof exitCode === "number" ? exitCode : null,
signal: typeof exitSignal === "string" ? exitSignal : null,
timedOut: false, stdout: output.stdout, stderr: output.stderr,
metadata: { processId, outputTruncated: output.truncated },
};
} else if (event.type === "error") {
throw new Error(event.error === "output_offset_expired"
? "CreateOS process output was evicted before it could be read."
: "CreateOS process stream reported an error.");
} else {
throw new Error("CreateOS returned an unknown process event.");
}
}
} catch (error) {View on GitHub (pinned to 3f1d897a7c)