Keeping track of the right process
17 October 2026
When Collie starts a repo, it remembers the process it started and keeps an eye on it. If that process exits, Collie notices within a few seconds and starts the repo again. That works well most of the time, but it has three weak spots. So here’s a design decision: Collie is moving to tracking each repo by its whole process group, and it’s getting a Stop option.
What’s wrong today
- It watches the wrong process. Collie starts a repo through a small wrapper shell, and that wrapper is what it remembers, not the server running inside it. The wrapper can stay alive while the server has crashed, or the other way round.
- It can’t stop anything. When a repo hangs, Collie starts it again without stopping the old copy, so you can end up with two.
- Process numbers get reused. After your Mac restarts, a remembered number can belong to a completely different program. Collie would think the repo is running and never start it.
What’s changing
- Each repo starts in its own process group. Collie saves that group, along with the time it started.
- Health checks look at the whole group, not just one process. If the start time doesn’t match, it isn’t the repo, whatever the number says. Repos with a web address are still checked by loading it first.
- A new Stop asks the repo to quit politely, waits a few seconds, then forces it if it has to.
- Before any restart, Collie always stops the old copy first, and it never starts a repo that’s still running.
Switching a repo off still won’t stop it on its own. Stopping is always something you choose.
What comes next
Once Collie knows the whole group, it can find the port each repo is listening on by itself. That gives every repo a clickable address and a better health check, without you having to set anything up.