Repository navigation
Closed
Labels
kind:featureA new feature or capability. Applied by the inbox-route classifier.A new feature or capability. Applied by the inbox-route classifier.priority:should-haveShould be done. Applied by the inbox-route classifier or a human.Should be done. Applied by the inbox-route classifier or a human.routed
Description
Motivation
min destroy today destroys a single session (resource) at a time — DestroyArgs takes exactly one session identifier (UUID or name), see the Destroy(DestroyArgs) subcommand in crates/minimal/src/lib.rs. When you have several sessions running, tearing them all down means invoking min destroy once per session, which is tedious and error-prone.
Current workaround
The only way to destroy everything in one go is a shell loop over min ls:
min ls --raw | while read line; do min destroy $line; done;This works but is clunky: it depends on the exact --raw output format, has no confirmation or dry-run, and offers no clean error handling if one destroy fails partway through.
Proposed behavior
Add a first-class min destroy all that destroys all current sessions in one step.
Suggested shape:
min destroy allenumerates every session using the same source of truth asmin ls— theListSessionsRPC (minimald-rpc) that backsLs(LsArgs)— and issues aDestroySessionfor each, rather than relying on parsing CLI text output.- Because this is destructive across all resources, prompt for confirmation by default and support a
--force/-fflag to skip the prompt (non-interactive use). This mirrors the existing precedent onStopArgs, which already exposes a--force/-fflag ("Force shutdown even if active sessions exist"). - Report per-session results and continue past individual failures where possible, exiting non-zero if any destroy failed, so a single bad session does not silently abort the rest.
- No-op cleanly (and print a friendly message unless
--raw/quiet) when there are no sessions, matchingmin ls's empty-list handling.
Relevant code
crates/minimal/src/lib.rs— CLI subcommand enum (Ls,Activate,Attach,Destroy,Stop),DestroyArgs,LsArgs(--raw), andStopArgs(--force/-f).crates/minimald-rpc/src/lib.rs—ListSessionsandDestroySessionRPCs to enumerate and remove sessions.
Reported via Slack; filing as a feature request.
Metadata
Metadata
Assignees
Labels
kind:featureA new feature or capability. Applied by the inbox-route classifier.A new feature or capability. Applied by the inbox-route classifier.priority:should-haveShould be done. Applied by the inbox-route classifier or a human.Should be done. Applied by the inbox-route classifier or a human.routed
Activity
gominimal-aw-bot commentedon Jul 17, 2026
Routing triage — #805
Kind: feature · Route: sdd · Target: gominimal/minimal · Confidence: 0.88
A Slack-filed request to add
min destroy all— a first-class CLI subcommand that tears down all active sessions in one step, with a confirmation prompt and a--force/-fbypass for non-interactive use.Verdict
The existing
min destroyaccepts exactly one session identifier. This request adds a bulk-destroy variant. The RPCs required (ListSessions,DestroySession) already exist in the repo; the work is adding the new CLI subcommand, the confirmation-prompt UX, per-session error handling, and tests. Classified sdd rather than patch because the new command involves UX design decisions (interactive confirmation behaviour, partial-failure exit code semantics) that benefit from a spec before implementation.Launch: a maintainer comments
/specon the work issue to start the SDD pipeline.Evidence
crates/minimal/src/lib.rs—Destroy(DestroyArgs)subcommand variant,DestroyArgsstruct (singlesessionfield),cmd_ls/LsArgs(the--rawpattern), andStopArgswith--force/-f(the confirmation-prompt precedent) all confirmed present by code search.crates/minimald-rpc/src/lib.rs—ListSessionsandDestroySessionRPC structs exist and are ready to call.crates/minimald/src/rpc.rsandcrates/sessions/docs/COMPOSITION.md— both RPCs plumbed through the daemon handler.crates/minimal/tests/cli.rs— existingDestroyArgsintegration tests establish the test-harness shape the newDestroyAlltests would follow.destroy allfound (only this issue itself and closed epic gominimal/inbox#159 "Define the minimal client interface", which is unrelated completed work).destroy allin open or closed issues.feat(minimald): implement session destroy + RPC) and merged PR [#159] Implement the minimal client interface (ls, activate, attach, destroy) #434 (Implement the minimal client interface — ls, activate, attach, destroy) confirm the single-session destroy surface is shipped. No existing entry for a bulk destroy variant.routing-outcomeentries retrieved (informed by routing-outcome inbox-route/I_kwDOSUhdos8AAAABH4dWDA and routing-outcome inbox-route/I_kwDOSUhdos8AAAABH4daBw). Both recordsddroutes to gominimal/minimal confirmed as correct target; neither carries a correction pointing elsewhere. The F4 outcomes in those records reflect scope rejections by the team, not routing errors — the target assignment was validated.sdd: true;route: allow.[inbox-route:decision]
{"schema":"inbox-route/v1","issue":306,"issue_node_id":"I_kwDOSUhdos8AAAABJM2sxA","dry_run":false,"kind":"feature","route":"sdd","confidence":0.88,"targets":[{"repo":"gominimal/minimal","reason":"all referenced code (DestroyArgs, ListSessions, DestroySession, cmd_ls pattern) lives in this repo"}],"labels":["kind:feature","priority:should-have"],"patch":null,"work_issue":{"title":"feature: add `min destroy all` command","body":"## Summary\n\nAdd a `min destroy all` subcommand to the minimal CLI that tears down every active session in one step, with a confirmation prompt and a `--force`/`-f` bypass for non-interactive use.\n\n## Problem\n\nDestroying multiple sessions today requires invoking `min destroy` once per session identifier, or piping `min ls --raw` through a shell loop. The loop approach relies on `--raw` output format stability and provides no confirmation, no dry-run, and brittle error handling if a destroy fails partway through.\n\n## Desired outcome\n\nA first-class `min destroy all` command that:\n- Enumerates sessions via the `ListSessions` RPC (same source as `min ls`) rather than parsing CLI text output.\n- Prompts for confirmation by default; skips the prompt with `--force`/`-f` (matching the precedent on `StopArgs`).\n- Issues a `DestroySession` RPC for each session, reports per-session results, continues past individual failures, and exits non-zero if any destroy failed.\n- No-ops cleanly (with a friendly message unless `--raw`/quiet) when no sessions exist, matching `min ls` empty-list handling.\n\n## Scope notes\n\nRelevant files the implementation is expected to touch:\n- `crates/minimal/src/lib.rs` — add `DestroyAll(DestroyAllArgs)` to the `Subcommand` enum, `DestroyAllArgs` struct with `--force`/`-f`, and `cmd_destroy_all` function.\n- Command dispatch entry point — new match arm for `DestroyAll`.\n- `crates/minimal/tests/cli.rs` — integration tests covering the happy path, no-sessions no-op, partial failure, and `--force` bypass.\n\nThe `ListSessions` and `DestroySession` RPCs in `crates/minimald-rpc/src/lib.rs` already exist and should not require changes.\n\n---\n<!-- SDD command vocabulary. Do not edit this footer. -->\n\nThis issue is the tracking issue for this work. A maintainer with write\naccess starts the SDD pipeline by commenting `/spec` on this issue or by\nflipping the `sdd:spec` label.\n\nSteer the pipeline with these comment commands. Each is gated to commenters\nwith write access to the repository.\n\n| Command | Where | Effect |\n|---|---|---|\n| `/spec` | this tracking issue | re-run `sdd-spec` to draft or revise the spec |\n| `/fastpath` | this tracking issue | confirm a single-session change; `sdd-spec` produces a stub spec PR and an execution plan comment in one run (ADR 0012) |\n| `/triage` | this tracking issue, after the spec PR is merged | start `sdd-triage` phase A (architecture) |\n| `/approve` | this tracking issue | full path: confirm the proposed plan so `sdd-triage` creates the Unit and task sub-issues. Fast path: dispatch the execution plan against `sdd-execute-{tier}` |\n| `/dispatch` | this tracking issue (full path only) | arm the cascade across the task tree |\n| `/revise <note>` | a spec, architecture, or implementation PR, or this tracking issue | re-run the owning agent with the note as an added instruction |\n| `/execute` | a task sub-issue | run `sdd-execute` for that task ahead of the schedule |\n\nMerging the spec PR advances to the architecture phase; merging the\narchitecture PR advances to a plan-comment phase, where `sdd-triage` posts\nthe proposed plan as one comment on this tracking issue. When an agent needs\na human decision it applies the `needs-human` label and posts one comment;\nclear the label once you have answered and the agent resumes."},"related":[],"rationale":"Issue gominimal/minimal#805 requests a new min destroy all CLI subcommand for the minimal daemon client. All referenced code lives in gominimal/minimal: DestroyArgs in crates/minimal/src/lib.rs, ListSessions and DestroySession RPCs in crates/minimald-rpc/src/lib.rs confirmed by code search, and cmd_ls pattern plus session resolution helpers in the same crate. No prior or duplicate issue found in gominimal/inbox (only the issue itself and an unrelated closed epic) or in gominimal/minimal (zero hits for destroy all). Two routing-outcome precedents retrieved (informed by routing-outcome inbox-route/I_kwDOSUhdos8AAAABH4dWDA and routing-outcome inbox-route/I_kwDOSUhdos8AAAABH4daBw) both confirm gominimal/minimal as the correct target for minimal CLI work and carry no correction pointing elsewhere. Classified sdd rather than patch because adding a new user-facing command involves UX design decisions — confirmation prompt behavior, error handling across partial failures, exit code semantics — that benefit from a spec before implementation."}gominimal-aw-bot commentedon Jul 17, 2026
[inbox-route:ledger]
Routed from #805 by inbox-route (https://github.com/gominimal/inbox/actions/runs/29590079024)
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABJM2sxA
Route: sdd
Work-Issue: #805 (in-place — the transferred issue is the deliverable)
jtnkminimal commentedon Jul 17, 2026
Implemented and pushed on
amp-codex-5.5-test-805-destroy-allatae0bfa88.This uses
min destroy --allrather than positionalmin destroy all, preserving the ability to destroy a session literally namedall. Behavior:--forcefor non-interactive bulk destruction;Verification:
cargo check -p minimal --libcargo clippy -p minimal --lib --no-deps -- -D warningscargo fmtgit diff --checkThe daemon-backed integration tests were added but cannot run on this macOS host because the existing
minimalddev-dependency reaches Linux-onlyprocfs; they require the Linux CI lane.(amp-codex-5.5-test-805-destroy-all)
jtnkminimal commentedon Jul 17, 2026
Resolved with #811