Hmbown/CodeWhale · error · anyhow::Error

pass --all to stop all fleet work

Error message

pass --all to stop all fleet work

What it means

Guard inside the `fleet stop` subcommand (FleetCommand::Stop). Stopping is fleet-wide: it calls manager.stop_all() and kills work for every run, so the CLI refuses a bare `codewhale fleet stop` unless the explicit `--all` acknowledgement flag is passed. Nothing has been stopped when this fires; it is a pure usage guard, not a runtime failure.

Source

Thrown at crates/tui/src/lib.rs:3161

            Ok(())
        }
        FleetCommand::Resume {
            run_id,
            stale_after_seconds,
        } => {
            let manager = manager.with_stale_after(Duration::from_secs(stale_after_seconds.max(1)));
            emit_fleet_receipt(&fleet_control::execute_fleet_control_with(
                ControlSurface::Cli,
                workspace,
                fleet_context,
                &manager,
                ControlOperation::FleetResume,
                Some(&run_id),
            ))
        }
        FleetCommand::Stop { all } => {
            if !all {
                bail!("pass --all to stop all fleet work");
            }
            let stopped = manager.stop_all()?;
            println!("stopped: {stopped}");
            Ok(())
        }
        FleetCommand::AlertDryRun(args) => {
            let class = alert_event_class(args.event);
            let adapter = alert_adapter(&args);
            let event = FleetAlertEvent {
                class,
                run_id: FleetRunId::from(args.run_id.clone()),
                worker_id: args.worker_id.clone(),
                task_id: args.task_id.clone(),
                status: alert_status(class, args.status.clone()),
                reason: args.reason.clone(),
            };
            let dispatcher = FleetAlertDispatcher::new(
                FleetAlertConfig::dry_run_for_adapter(adapter),

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Re-run as `codewhale fleet stop --all` when you really mean to stop all fleet work
  2. To affect a single run, use the run-id-scoped fleet controls rather than stop — stop is deliberately fleet-wide
  3. Update scripts and docs to always carry `--all` so intent is explicit

Example fix

// before
$ codewhale fleet stop
Error: pass --all to stop all fleet work

// after
$ codewhale fleet stop --all
stopped: 3
Defensive patterns

Strategy: validation

Validate before calling

# wrapper: refuse a bare `fleet stop` before codewhale ever runs
if [ "$1" = fleet ] && [ "$2" = stop ]; then
  case " $3 $4 $5 " in *' --all '*) ;; *) echo 'refusing: fleet stop requires --all' >&2; exit 2;; esac
fi
exec codewhale "$@"

Prevention

When it happens

Trigger: Executing `codewhale fleet stop` without `--all` (FleetCommand::Stop { all: false }). Per-run operations exist elsewhere (e.g. FleetResume takes a run_id), so users often assume stop also accepts a run id — it does not.

Common situations: Muscle memory from per-run fleet commands (resume with a run id); copy-pasted scripts written before the confirmation flag was added; CI cleanup jobs that call bare `fleet stop`.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/2fa4c2d7965ac4a9. Report an issue: GitHub.