feat(cli): add conductor stop command for background workflows#12
Merged
feat(cli): add conductor stop command for background workflows#12
conductor stop command for background workflows#12Conversation
Add PID file tracking and a `stop` CLI command to manage background workflow processes launched with `--web-bg`. Previously, stopping a background workflow required manually finding and killing the process. - Add `pid.py` with PID file read/write/cleanup utilities (~/.conductor/runs/) - Write PID file in `bg_runner.py` after background launch succeeds - Clean up PID file on natural child process exit in `run.py` - Add `conductor stop` command with `--port` and `--all` options - Add `POST /api/stop` endpoint to web dashboard server - Add stop button to web dashboard header (visible when workflow is running) - Race engine.run() against dashboard stop signal so stop actually cancels the workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
conductor stopCLI command to manage background workflow processes launched with--web-bg~/.conductor/runs/) so background processes can be discovered and stoppedPOST /api/stopendpoint that races against the workflow engine to actually cancel executionDetails
Previously, stopping a background workflow required manually finding and killing the process (
kill $(lsof -ti:PORT)). Now:conductor stop— auto-stops if one running, lists if multipleconductor stop --port 8080— stop specific portconductor stop --all— stop all background workflows/api/stopPID files are written on
--web-bglaunch and cleaned up on natural completion or explicit stop.Test plan
test_pid.py)test_stop.py)/api/stopendpoint and stop signal (test_server.py)make lintandmake typecheckpass🤖 Generated with Claude Code