Start docketeer in dev mode (with live reload) as a background process so you can monitor its output during development.
Steps
- •
Check if already running: Use
pgrep -af "docketeer start" | grep -v pgrepto see if a docketeer process exists (the grep filters out pgrep matching its own command line). - •
If running, check if it's ours: Try to match the PID to one of our background tasks (use TaskOutput with block=false). If it's not one of our background tasks (e.g. started from another terminal), kill it and start fresh — we need to own the process to monitor it.
- •
If ours, health-check it: Read the tail of the background task output. Look for signs it's healthy vs borked:
- •Healthy: recent "Listening for messages" or normal HTTP request logs, no repeated tracebacks
- •Borked: repeated exceptions/tracebacks in recent output, "Connection refused" or "Connection closed" errors, the process is a zombie or stuck in a restart loop (watchfiles reloading over and over without reaching "Listening")
- •
If borked, not ours, or not running:
- •Kill any existing docketeer processes:
pkill -f "docketeer start"(and wait a moment for cleanup) - •Start fresh: run
uv run docketeer start --devin the background using Bash withrun_in_background: true - •Wait a few seconds, then check the output to confirm it connected to Rocket Chat and reached "Listening for messages"
- •Kill any existing docketeer processes:
- •
If healthy: Just report that it's already running and looks good. Show a few recent lines of output so the user can see its state.
- •
Report: Tell the user the background task ID and whether this was a fresh start or an existing healthy process.