Repository navigation
Description
Task
| slice | size | difficulty | model | who | estimated lines |
|---|---|---|---|---|---|
| Start, attach and resume | S | routine | standard | an agent | 120 (70 code, 50 tests) |
A box start prints no "a session already exists for this path" warning.
Found in the owner's test run of 2026-11-14 on 0.8.0-dev.527 (dd7d8cf), finding U12. Every start from a directory that already has a box prints:
warning: a session already exists for this path (<handle>); activating creates a second one, leaving bare `min` here ambiguous between them. …
It prints on a healthy start before the box shell, where the shell's first paint replaces it. It prints w
91AE
ith --new, which asks for a second box on purpose (BCLI-070). It prints before refusals that create nothing. It can name an arbitrary stopped box, because duplicate_session_warning falls back to the first record with the path in any state (crates/minimal/src/cmd/list.rs:221-228).
Cause: the start lists the host's boxes only to build this warning, then prints it (crates/minimal/src/cmd/boxes/create.rs:3593-3617). AGENTS.md says not to add a line before the shell on a healthy start, and an advisory never becomes a prompt. The fact it tried to state stays visible where it lasts: min box list lists every box of the project, and a bare min box attach with two candidates refuses with exit 2, listing them (BCLI-068).
Change: remove the warning, the listing that feeds it, and the reconnect that exists only for that listing's failure. Remove duplicate_session_warning and its tests (crates/minimal/src/tests.rs:873-964). The start then connects once, as CreateSession already carries its own version gate. No spec or doc quotes the text.
Covers:
- BCLI-029 (the start creates the box and attaches, or prints the id, and nothing else)
- BCLI-070 (
--newrequests a fresh instance with no warning)
Layers:
- client:
- crates/minimal/src/cmd/boxes/create.rs: the start no longer lists the host's boxes before
CreateSessionand prints no duplicate-path warning - crates/minimal/src/cmd/list.rs:
duplicate_session_warningis removed - crates/minimal/src/tests.rs: the warning's tests are removed; a new test starts a second box for a path that has one, with and without
--newand--detach, and checks that stderr is empty and stdout holds only the id cargo nextest run -p minimal start_with_a_box_for_the_path_prints_no_warning
- crates/minimal/src/cmd/boxes/create.rs: the start no longer lists the host's boxes before
Plan block
### T49 — A box start prints no duplicate-path warning
slice: S3
kind: task
covers: BCLI-029, BCLI-070
size: S
est: 70 code, 50 tests
executor: agent
difficulty: routine
model: standard
diagnostics: one message removed; no new text; start_with_a_box_for_the_path_prints_no_warning pins the empty stderr
observability: none new; the start's existing activation step span covers the connect
layers:
- client:
- crates/minimal/src/cmd/boxes/create.rs: the start no longer lists the host's boxes before `CreateSession` and prints no duplicate-path warning
- crates/minimal/src/cmd/list.rs: `duplicate_session_warning` is removed
- crates/minimal/src/tests.rs: the warning's tests are removed; a new test starts a second box for a path that has one, with and without `--new` and `--detach`, and checks that stderr is empty and stdout holds only the id
test: cargo nextest run -p minimal start_with_a_box_for_the_path_prints_no_warning
produces: none
consumes: none
proof: `min box start --detach` and `min session start --new --detach` from a directory that already has a box print only the new box's id, and nothing on stderr.
Activity
minimal-foundry commentedon Nov 14, 2026
Done. #3431 merged.
branch
agent/3422-a-box-start-prints-no-duplicate-path-warning· epic #2879 · PR #3431781da02dUpdated 2026-11-14T22:54:15.647Z.