Skip to content

No read-only way to list background runs — conductor stop is the only listing, and it stops the run when exactly one exists #384

Description

Summary

There is no read-only way to see which background workflows are running. The only command that lists them is conductor stop — which stops one when exactly one is running:

conductor stop

With no arguments, lists running background workflows. If exactly one is found, stops it automatically.

So the natural "what's running?" reflex is destructive precisely when there is a single run to lose. I killed a healthy 40-minute workflow this way: I ran conductor stop to check status, having read the help text as "lists, and if unambiguous, offers to stop". The behaviour is documented, so this is not a correctness bug — but the documentation is the only thing standing between the user and data loss, and the destructive path is the shortest one to type.

The asymmetry is what makes it sting: with two runs it prints a table and does nothing, with one it terminates. The safe outcome is the one that requires more runs to be active.

Why a flag on stop isn't the fix

conductor stop --dry-run would work mechanically, but it keeps the hazard one typo away and leaves "list running workflows" filed under a destructive verb. Discovery is a read operation and wants a read verb.

Proposal

Add a read-only listing command — conductor status (or ls / ps):

conductor status
conductor status --json

It already exists in pieces: read_pid_files() (cli/pid.py) does the discovery and stale-file cleanup, and _print_running_list() (cli/app.py) does the rendering. This is mostly wiring them to a command that doesn't kill anything.

Worth surfacing per run, all of which are already in the PID file or one probe away:

  • port, PID, workflow name, start time (all present today)
  • the dashboard URL, so it can be pasted straight into a browser — this is the field I actually want most often, and there is currently no way to recover it after the launching terminal is gone
  • liveness, and whether the dashboard is answering

--json for the same reason stop needs it: automation should not have to parse a table.

Then narrow stop

Once discovery has its own home, bare conductor stop auto-stopping a single run is defensible as a convenience — but I would still argue for requiring --port or --all to name a target explicitly, since "stop" reading as "show me what's running" is exactly the misreading that costs a run. At minimum, printing what it is about to stop and why would make the destructive step legible.

Related

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