Labels: bug, doctor, ux
Description
Two functions answer the same question — "is a supported browser running?" — from two
different, inconsistent process-name lists.
The daemon's list is correct and includes everything in PROFILES:
# src/browser_harness/daemon.py:179
return any(n in out for n in ("chrome.exe", "msedge.exe", "chromium.exe", "brave.exe", "helium.exe"))
Doctor's list is a strict subset, and drops Brave on both platforms and Chromium on
Windows:
# src/browser_harness/admin.py:900-913
if system == "Windows":
out = subprocess.check_output(["tasklist"], ...)
names = ("chrome.exe", "msedge.exe", "helium.exe") # no chromium.exe, no brave.exe
else:
out = subprocess.check_output(["ps", "-A", "-o", "comm="], ...)
names = ("Google Chrome", "chrome", "chromium", "Microsoft Edge", "msedge", "helium") # no brave
Brave is a first-class target elsewhere in the codebase:
daemon._MAC_PROFILES → Library/Application Support/BraveSoftware/Brave-Browser
daemon._LINUX_PROFILES → .config/BraveSoftware/... (via the flatpak entry)
daemon._WINDOWS_PROFILES → BraveSoftware/Brave-Browser/User Data
admin._BROWSER_LAUNCH → ("brave", "Brave Browser", ("brave-browser", "brave"), "brave")
So the harness will discover a Brave profile, connect to Brave over CDP, and drive it —
and then --doctor will tell the user Brave is not running.
Impact
run_doctor()'s exit code is derived from this check:
# admin.py:1152
return 0 if (chrome and daemon) else 1
A Brave user with a healthy daemon and a live browser connection gets:
[FAIL] chrome running — start chrome/edge
[ok ] daemon alive
[ok ] active browser connections — 1
exit code 1. install.md and SKILL.md both direct agents to --doctor as the
diagnostic when something looks wrong, so the agent is handed a false failure and a
"start chrome/edge" instruction while its browser is already attached and working.
The row directly below it contradicting the FAIL makes it worse, not better.
Windows Chromium users hit the same thing (chromium.exe is missing from doctor's list
but present in the daemon's).
Suggested fix
There should be one list, not two. admin._chrome_running() should call
daemon.supported_browser_running() — it already imports from .daemon in several
places — or both should read a shared constant. Either way, add brave.exe/brave and
chromium.exe.
Secondary: run_doctor() exiting 1 on the process-name check while
active browser connections is non-zero is backwards. A live CDP connection is stronger
evidence than a tasklist substring match, and should be able to satisfy the health
check on its own — run_doctor_json() already gets this right
(healthy = browser_ready or (chrome and daemon), admin.py:1166).
Labels: bug, doctor, ux
Description
Two functions answer the same question — "is a supported browser running?" — from two
different, inconsistent process-name lists.
The daemon's list is correct and includes everything in
PROFILES:Doctor's list is a strict subset, and drops Brave on both platforms and Chromium on
Windows:
Brave is a first-class target elsewhere in the codebase:
daemon._MAC_PROFILES→Library/Application Support/BraveSoftware/Brave-Browserdaemon._LINUX_PROFILES→.config/BraveSoftware/...(via the flatpak entry)daemon._WINDOWS_PROFILES→BraveSoftware/Brave-Browser/User Dataadmin._BROWSER_LAUNCH→("brave", "Brave Browser", ("brave-browser", "brave"), "brave")So the harness will discover a Brave profile, connect to Brave over CDP, and drive it —
and then
--doctorwill tell the user Brave is not running.Impact
run_doctor()'s exit code is derived from this check:A Brave user with a healthy daemon and a live browser connection gets:
exit code 1.
install.mdandSKILL.mdboth direct agents to--doctoras thediagnostic when something looks wrong, so the agent is handed a false failure and a
"start chrome/edge" instruction while its browser is already attached and working.
The row directly below it contradicting the FAIL makes it worse, not better.
Windows Chromium users hit the same thing (
chromium.exeis missing from doctor's listbut present in the daemon's).
Suggested fix
There should be one list, not two.
admin._chrome_running()should calldaemon.supported_browser_running()— it already imports from.daemonin severalplaces — or both should read a shared constant. Either way, add
brave.exe/braveandchromium.exe.Secondary:
run_doctor()exiting 1 on the process-name check whileactive browser connectionsis non-zero is backwards. A live CDP connection is strongerevidence than a
tasklistsubstring match, and should be able to satisfy the healthcheck on its own —
run_doctor_json()already gets this right(
healthy = browser_ready or (chrome and daemon),admin.py:1166).