Problem
The Deno subprocess runtime writes protocol messages directly to child.stdin without observing stream error events or awaiting write completion.
If the child closes stdin before a tool-result message is written, Node can emit an unhandled EPIPE. That can terminate the host process. In environments that intercept the uncaught event, execution stalls until an outer timeout because the runtime never translates the write failure into an execution result.
Reproduction
- Start a Deno worker subprocess.
- Have the child close stdin after the initial protocol exchange.
- Emit a tool call so the host writes a tool-result message.
On the current base, the write emits an uncaught EPIPE. With the event intercepted for the regression harness, the execution then reaches its five-second outer timeout.
Expected behavior
- Subprocess stdin failures do not escape as uncaught stream errors.
- A failed initial or tool-result write disposes the child process.
- Execution returns a failed
ExecuteResult with an actionable write error.
- Existing missing-Deno diagnostics remain unchanged.
Problem
The Deno subprocess runtime writes protocol messages directly to
child.stdinwithout observing streamerrorevents or awaiting write completion.If the child closes stdin before a tool-result message is written, Node can emit an unhandled
EPIPE. That can terminate the host process. In environments that intercept the uncaught event, execution stalls until an outer timeout because the runtime never translates the write failure into an execution result.Reproduction
On the current base, the write emits an uncaught
EPIPE. With the event intercepted for the regression harness, the execution then reaches its five-second outer timeout.Expected behavior
ExecuteResultwith an actionable write error.