can1357/oh-my-pi · error · ToolError
${outputText}\n\nCommand failed: missing exit status
Error message
${outputText}\n\nCommand failed: missing exit status What it means
After a bash result that is neither success, cancelled, nor timed out, if result.exitCode is undefined BashTool throws this ToolError stating the process finished without an exit status. The captured outputText is included for debugging. This is a defensive path for executors that return no exit code.
Source
Thrown at packages/coding-agent/src/tools/bash.ts:667
timeoutSec: number | undefined,
outputText: string,
): void {
if (result.cancelled) {
// Local executor output already carries a leading `[Command cancelled]`
// notice from the sink; PTY/bridge output does not, so annotate only
// the latter.
const out = normalizeResultOutput(result);
const annotated = out.startsWith("[Command cancelled]") ? out : out ? `${out}\n\n[Command aborted]` : out;
throw new ToolError(annotated || "Command aborted");
}
if (result.timedOut === true) {
const out = normalizeResultOutput(result);
const message =
timeoutSec === undefined ? "Command timed out" : `Command timed out after ${timeoutSec} seconds`;
throw new ToolError(out ? `${out}\n\n[${message}]` : message);
}
if (result.exitCode === undefined) {
throw new ToolError(`${outputText}\n\nCommand failed: missing exit status`);
}
}
async #buildCompletedResult(
result: BashResult | BashInteractiveResult,
timeoutSec: number | undefined,
options: {
requestedTimeoutSec?: number;
notices?: readonly string[];
terminalId?: string;
wallTimeMs?: number;
} = {},
): Promise<AgentToolResult<BashToolDetails>> {
const exitCode = result.exitCode;
const failedExit = exitCode !== undefined && exitCode !== 0;
const outputLines = [this.#formatResultOutput(result)];
const notices: string[] = [];View on GitHub (pinned to 9690622007)
Solutions
- Rerun the command — a missing exit status is usually transient infrastructure loss, not a command error.
- Check the captured output above the message for the real failure (OOM killer, crash, signal).
- Inspect system logs (dmesg/journalctl) for OOM or signal kills of the shell process.
- If using a custom executor/bridge, ensure it always reports a numeric exitCode (signal deaths can map to 128+signum).
Defensive patterns
Strategy: retry
Try / catch
try { await bash.run(cmd, opts); } catch (e) { if (e instanceof ToolError && e.message.includes('missing exit status')) { /* inspect outputText, check OOM/signals, retry once */ } else throw e; } Prevention
- Retry once on this transient infrastructure failure before surfacing it.
- Monitor for OOM killer events if commands allocate heavily.
- Use the built-in local executor, which reliably reports exit codes.
- If implementing a custom executor, always map signal deaths to 128+signum exit codes.
When it happens
Trigger: The executor returned a result where exitCode === undefined and timedOut/cancelled are not true — e.g. the process was killed by a signal the bridge didn't translate into an exit code, the PTY/bridge connection dropped, or an executor bug omitted exitCode.
Common situations: Process killed via SIGKILL/OOM through a code path that doesn't map signals to exit codes; infrastructure/PTY failures between the shell and the tool; custom executor implementations that don't always set exitCode.
Related errors
- Command exited with code ${result.exitCode}
- ${finalText}
- %%bash requires a POSIX bash, but none was found. Install Gi
- Command aborted
- Command timed out after ${err.message.slice("timeout:".lengt
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/72528b48854c3369.
Report an issue: GitHub.