Repository navigation
Closed
Description
Task
| slice | size | difficulty | model | who | estimated lines |
|---|---|---|---|---|---|
| Run commands inside a box | S | routine | standard | an agent | 90 (20 code, 70 tests) |
An attach prints no ssh status line, and the daemon's attach refusal says box.
Found in the owner's test run of 2026-11-14 on 0.8.0-dev.527 (dd7d8cf).
- U1:
Connection to local-minimald0 closed.prints when you detach frommin box attach, when you detach frommin box exec -t, when a stop ends an attached session, and with the N6 refusal. The line is OpenSSH's own.ssh_commandrunsssh -tt(crates/minimal-client/src/attach.rs:421) with noLogLeveloption (attach.rs:300-452), and ssh prints that line at its default level when a-ttsession closes. A healthy detach should print nothing. When the daemon ends the attach, BCLI-068 allows one stderr line that names the cause, and this is a second. - U5 (part): the daemon writes
Error attaching to session: <cause>into the channel when an attach fails (crates/minimald/src/connection.rs:496). It has a capitalError:where everyminerror sayserror:, and it says session for the box. The other threeError:cases in U5 (typed-filter refusals, a baremin box attachwith two candidates, a resume of a running box) have noError:string incrates/minimalorcrates/minimal-client; the only one isautospawn.rs:507. The first step of this task captures the stderr of each of the three. If it is this daemon line, this task covers it. If not, the agent reports where the line comes from and does not widen the scope.
The new daemon line:
Cannot attach to the box: <cause>
It keeps the refusal's own exit status (connection.rs:499). These tests pin the old text and change with it: crates/minimald/src/box_actor/tests.rs lines 394, 2310, 2333, 4843 and 4875.
-o LogLevel=ERROR still lets ssh print a failed connect, a host-key mismatch and a refused authentication. Those are what the attach's exit-255 handling reports (crates/minimal/src/attach.rs:77-100).
Covers:
- BCLI-068 (one cause line when the daemon ends an attach; exit 0 and nothing printed on a detach)
Layers:
- client:
- crates/minimal-client/src/attach.rs:
ssh_commandpasses-o LogLevel=ERROR, so ssh prints no status line on a clean close and still prints its errors; its unit test pins the argument cargo nextest run -p minimal-client ssh_command_quiets_ssh_status_lines
- crates/minimal-client/src/attach.rs:
- daemon:
- crates/minimald/src/connection.rs: a failed attach writes
Cannot attach to the box: <cause>in place ofError attaching to session: <cause> - crates/minimald/src/box_actor/tests.rs: the five tests that pin the old line read the new one
cargo nextest run -p minimald attach_refusal_line_names_the_box
- crates/minimald/src/connection.rs: a failed attach writes
Plan block
### T47 — An attach prints no ssh status line, and the daemon's attach refusal says box
slice: S4
kind: task
covers: BCLI-068
size: S
est: 20 code, 70 tests
executor: agent
difficulty: routine
model: standard
diagnostics: the daemon's attach refusal reads `Cannot attach to the box: <cause>`; ssh prints only its errors; attach_refusal_line_names_the_box pins the daemon text and ssh_command_quiets_ssh_status_lines pins the argument
observability: none new; the daemon's existing attach span records the refusal
layers:
- client:
- crates/minimal-client/src/attach.rs: `ssh_command` passes `-o LogLevel=ERROR`, so ssh prints no status line on a clean close and still prints its errors; its unit test pins the argument
test: cargo nextest run -p minimal-client ssh_command_quiets_ssh_status_lines
- daemon:
- crates/minimald/src/connection.rs: a failed attach writes `Cannot attach to the box: <cause>` in place of `Error attaching to session: <cause>`
- crates/minimald/src/box_actor/tests.rs: the five tests that pin the old line read the new one
test: cargo nextest run -p minimald attach_refusal_line_names_the_box
produces: none
consumes: none
proof: Detaching from `min box attach` and from `min box exec -t` prints nothing and exits 0; a stop of an attached box prints only `min`'s cause line; a refused attach prints `Cannot attach to the box: <cause>`.
Reacted by minimal-foundry
Metadata
Metadata
Assignees
Labels
No labels
Activity
minimal-foundry commentedon Nov 14, 2026
Done. #3437 merged.
branch
agent/3420-an-attach-prints-no-ssh-status-line-and-the-daem· epic #2879 · PR #3437Updated 2026-11-17T00:01:33.897Z.