Repository navigation
Description
Task
| slice | size | difficulty | model | who | estimated lines |
|---|---|---|---|---|---|
| Run tasks and wait on them | S | needs care | standard | an agent | 80 (15 code, 65 tests) |
An interrupted or timed-out
min task runinside a box prints no socat warning and no false connection line.
Found in the owner's test run of 2026-11-14 on 0.8.0-dev.527 (dd7d8cf), in checks H4 (Ctrl-C) and N8 (a task's timeout). The in-box min task run printed:
socat[4] W exiting on signal 15
error: the connection closed before the task reported its exit status
The exit codes were right.
Cause: the in-box min helper reaches the daemon through socat (crates/minimald/src/env_min_helper.sh:154 and :160). socat's stderr goes to the user's terminal, so socat's own warning prints when SIGTERM ends it. The helper then finds no exit: line on the stream and prints its "connection closed" line (env_min_helper.sh:274-278), although a signal, not a broken connection, ended the run.
Change:
- socat's stderr goes to
/dev/nullin both invocations. The helper already reports a stream that ends without an exit status, so the user loses no fact. - When the helper's socat ended on a signal (its wait status is 128 or more), the helper prints no "connection closed" line. The exit code stays what it is today. When the stream ends with no
exit:line and socat exited on its own, the helper still printserror: the connection closed before the task reported its exit statusand returns 125.
crates/minimald/src/env.rs:5559 pins the line for the broken-stream case. It keeps passing.
Covers:
- BCLI-010 (the run writes nothing but the task's own output)
- BCLI-014 (a timed-out run says why once, then exits 124)
Layers:
- daemon:
- crates/minimald/src/env_min_helper.sh: both socat invocations send socat's stderr to /dev/null; a run whose socat ended on a signal prints no "connection closed" line and keeps its exit code
- crates/minimald/src/env.rs: its helper tests gain a run that SIGTERM ends, checking stderr holds neither line, beside the existing broken-stream test
cargo nextest run -p minimald min_helper_run_ended_by_signal_prints_no_connection_line
Plan block
### T48 — An interrupted in-box task run prints no socat or connection line
slice: S2
kind: task
covers: BCLI-010, BCLI-014
size: S
est: 15 code, 65 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: no new text; the broken-stream line `error: the connection closed before the task reported its exit status` stays for a stream that ends with no exit status and no signal, pinned by env.rs:5559 and the new test
observability: none new
layers:
- daemon:
- crates/minimald/src/env_min_helper.sh: both socat invocations send socat's stderr to /dev/null; a run whose socat ended on a signal prints no "connection closed" line and keeps its exit code
- crates/minimald/src/env.rs: its helper tests gain a run that SIGTERM ends, checking stderr holds neither line, beside the existing broken-stream test
test: cargo nextest run -p minimald min_helper_run_ended_by_signal_prints_no_connection_line
produces: none
consumes: none
proof: Inside a box, `min task run` of a task that Ctrl-C or its timeout ends prints neither the socat warning nor the connection line, and exits with the same code as today.
Activity
minimal-foundry commentedon Nov 14, 2026
Done. #3435 merged.
branch
agent/3421-an-interrupted-in-box-task-run-prints-no-socat-o· epic #2879 · PR #34358811460649e5dbe782bf06c74ce434fcfc81e7cbUpdated 2026-11-14T21:34:32.178Z.