You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS: Session discovery fails - pgrep -af does not output command line #1
ClawChain cannot discover any Codex/Claude Code sessions on macOS. The dashboard shows zero session cards despite active Codex processes running.
Root Cause
In clawchain/host_monitor.py, the _scan_processes_via_pgrep() function uses pgrep -af . to scan running processes. On Linux, this outputs PID full_command_line, but on macOS the -a flag is not supported the same way — it only outputs bare PIDs (e.g., 1, 192, 35024).
Since _matches_agent() tries to regex-match agent patterns (like codex) against these lines, it never finds a match because the lines contain only numbers.
# Current code — works on Linux, broken on macOSprobe=subprocess.run(
["pgrep", "-af", "."],
capture_output=True, text=True, check=False,
)
macOS pgrep -af . output:
1
192
35024
35025
Linux pgrep -af . output:
35024 node /usr/bin/codex
35025 codex resume
Environment
macOS Darwin 25.3.0 (arm64)
GNU bash 3.2.57
Python 3.12
ClawChain 0.1.0
Suggested Fix
Replace pgrep -af . with ps -eo pid,args, which outputs PID + full command line on both macOS and Linux. Keep pgrep as a fallback if ps is unavailable.
Steps to Reproduce
Install ClawChain on macOS
Start a Codex session
Run the setup script and open the dashboard
Observe that no sessions appear despite ps aux | grep codex showing running processes
Activity
fix: use ps instead of pgrep for macOS process detection
Mr-Tieguigui commentedon Mar 31, 2026
Get