What happened?
On macOS, quitting an OmO native session can terminate unrelated processes when Homebrew proctools provides the first pgrep on PATH.
MCP shutdown calls collectProcessTree(), which currently runs pgrep -P <pid> without the required positional pattern. Homebrew pgrep treats that as a system-wide match, so reapProcessTree() can collect and signal PIDs that are not descendants of Senpi.
This matters because a normal /quit can close unrelated terminals, editors, and background services.
Steps to reproduce safely
Do not reproduce this through /quit. The lookup bug can be observed without sending any signals:
sleep 30 & child=$!
/opt/homebrew/bin/pgrep -P $$ | wc -l
/opt/homebrew/bin/pgrep -P $$ .
/usr/bin/pgrep -P $$ .
kill "$child"
On my machine, the patternless Homebrew command returned 798 PIDs and included PID 1. Both commands with the explicit . pattern returned only the actual child.
Expected behavior
Process-tree collection should query only direct children. Passing . as the match-all process-name pattern works with both Homebrew proctools and macOS /usr/bin/pgrep.
I am preparing a minimal fix and regression test.
Version
omo-ai@5.0.0-0.beta.6
- nested
@code-yeongyu/senpi@2026.8.11-4
- Homebrew
proctools@0.4pre1
- current
main at 20d33e8e46bef8ad38fcf1e99f8196b599741c44
What happened?
On macOS, quitting an OmO native session can terminate unrelated processes when Homebrew
proctoolsprovides the firstpgreponPATH.MCP shutdown calls
collectProcessTree(), which currently runspgrep -P <pid>without the required positional pattern. Homebrewpgreptreats that as a system-wide match, soreapProcessTree()can collect and signal PIDs that are not descendants of Senpi.This matters because a normal
/quitcan close unrelated terminals, editors, and background services.Steps to reproduce safely
Do not reproduce this through
/quit. The lookup bug can be observed without sending any signals:On my machine, the patternless Homebrew command returned 798 PIDs and included PID 1. Both commands with the explicit
.pattern returned only the actual child.Expected behavior
Process-tree collection should query only direct children. Passing
.as the match-all process-name pattern works with both Homebrewproctoolsand macOS/usr/bin/pgrep.I am preparing a minimal fix and regression test.
Version
omo-ai@5.0.0-0.beta.6@code-yeongyu/senpi@2026.8.11-4proctools@0.4pre1mainat20d33e8e46bef8ad38fcf1e99f8196b599741c44