8000 T47 — An attach prints no ssh status line, and the daemon's attach refusal says box · Issue #3420 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T47 — An attach prints no ssh status line, and the daemon's attach refusal says box #3420

Closed

Description

@agent-137

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 from min box attach, when you detach from min box exec -t, when a stop ends an attached session, and with the N6 refusal. The line is OpenSSH's own. ssh_command runs ssh -tt (crates/minimal-client/src/attach.rs:421) with no LogLevel option (attach.rs:300-452), and ssh prints that line at its default level when a -tt session 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 capital Error: where every min error says error:, and it says session for the box. The other three Error: cases in U5 (typed-filter refusals, a bare min box attach with two candidates, a resume of a running box) have no Error: string in crates/minimal or crates/minimal-client; the only one is autospawn.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_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
    • 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
    • cargo nextest run -p minimald attach_refusal_line_names_the_box
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>`.

Activity

  1. minimal-foundry commented on Nov 14, 2026

    @minimal-foundry
    Contributor

    Done. #3437 merged.

    branch agent/3420-an-attach-prints-no-ssh-status-line-and-the-daem · epic #2879 · PR #3437

    Updated 2026-11-17T00:01:33.897Z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0