can1357/oh-my-pi · critical · RpcProcessExitError
RPC process stopped before ready: {error}. Stderr: {stderr}
Error message
RPC process stopped before ready: {error}. Stderr: {stderr} What it means
During start(), if the child process closes (exits or errors) before sending the ready signal, the client raises the underlying RpcError if it is one, otherwise wraps it in RpcProcessExitError with the captured stderr. This means the agent died during startup rather than merely being slow.
Source
Thrown at python/omp-rpc/src/omp_rpc/client.py:641
)
self._stdout_thread.start()
self._stderr_thread.start()
if not self._ready.wait(self._startup_timeout):
stderr = self.stderr
self.stop()
raise RpcTimeoutError(
f"Timed out waiting for RPC ready signal. Stderr: {stderr}"
)
if not self._ready_received:
error = self._closed_error
stderr = self.stderr
self.stop()
if isinstance(error, RpcError):
raise error
if error is not None:
raise RpcProcessExitError(
f"RPC process stopped before ready: {error}. Stderr: {stderr}"
) from error
raise RpcTimeoutError(
f"Timed out waiting for RPC ready signal. Stderr: {stderr}"
)
ready_event = self._ready_event
if (
ready_event is not None
and ready_event.supported_protocol_versions is not None
and 2 in ready_event.supported_protocol_versions
and ready_event.max_frame_bytes == _MAX_RPC_FRAME_BYTES
and ready_event.max_reassembled_frame_bytes == _MAX_RPC_REASSEMBLED_BYTES
):
try:
self._protocol_v2_enabled = True
negotiation = self._request("negotiate_protocol", protocolVersion=2)
if negotiation.get("protocolVersion") != 2:View on GitHub (pinned to 9690622007)
Solutions
- Inspect the wrapped error and Stderr text in the message — it contains the child's actual crash output.
- Run the agent command manually in a terminal to reproduce and see the startup error directly.
- Fix the agent command/path/config (correct venv, interpreter, module, API keys).
- Check for environment issues: permissions, OOM kills, missing shared libraries.
- Verify agent and client versions are compatible.
Example fix
// before: command points at a nonexistent entrypoint RpcClient(command=["python", "-m", "agent_server_typo"]) // after RpcClient(command=["python", "-m", "agent_server"])
Defensive patterns
Strategy: try-catch
Try / catch
try:
client.start()
except RpcProcessExitError as exc:
logger.error("agent died during startup: %s", exc)
raise # crash output is embedded; fix the agent command/config Prevention
- Test the agent command standalone before wiring it into the client
- Validate config files and env (keys, paths, interpreter) before startup
- Keep agent and client versions compatible
- Monitor for OOM/permission kills in the deployment environment
When it happens
Trigger: Agent subprocess crashes/exits during startup: bad command path, missing interpreter/module, unhandled exception in the agent, invalid config read at boot, or the OS killing the process (OOM, permissions).
Common situations: Typos in the agent command or venv path; Python version mismatch; corrupt config file parsed at startup; missing API keys causing early fatal error; binary incompatible with the OS/arch.
Related errors
- Timed out waiting for RPC ready signal. Stderr: {stderr}
- str(self._closed_error)
- ${argv[0]} exited with code ${exitCode}: ${stderr.trim().sli
- Adapter process exited before socket was ready
- Adapter process exited before TCP port ${host}:${port} was r
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/00d47d423d2eb25f.
Report an issue: GitHub.