Watching process creation while opening the dashboard, codex-x86_64-pc-windows-msvc.exe spawns as a direct child of Token Meter's server process about a second after the page loads, with its own new conhost.exe. That causes a momentary flash as the console window opens and closes quickly.
Cause: page.html:5117 calls loadAgentAccess() unconditionally at the bottom of the page script, so it runs on every dashboard load, not just when the Settings > Agent connection panel is visible. That fires fetch('/agent-access/status') (page.html:2305), which hits agent_access_client_status("codex", ...) server-side (token_meter/app.py:5000): runner([cli_path, "mcp", "get", AGENT_ACCESS_SERVER, "--json"], ...), plain subprocess.run with no window-hiding options. Same gap as #19, different call site. If Codex CLI is installed, every dashboard load spawns it in a visible console.
Fix: route this subprocess.run call through WindowsPlatformServices.process_options() (token_meter/platforms/windows.py:62) for CREATE_NO_WINDOW on Windows, same as #19. Worth also considering calling loadAgentAccess() only when the settings panel is opened, since /agent-access/status currently runs unconditionally on every load.
Environment
- Windows 11 Pro, build 10.0.26200
- Token Meter revision 0361558 (main, 2026-08-14)
- Codex CLI installed and on PATH (
codex-x86_64-pc-windows-msvc.exe)
Watching process creation while opening the dashboard,
codex-x86_64-pc-windows-msvc.exespawns as a direct child of Token Meter's server process about a second after the page loads, with its own newconhost.exe. That causes a momentary flash as the console window opens and closes quickly.Cause:
page.html:5117callsloadAgentAccess()unconditionally at the bottom of the page script, so it runs on every dashboard load, not just when the Settings > Agent connection panel is visible. That firesfetch('/agent-access/status')(page.html:2305), which hitsagent_access_client_status("codex", ...)server-side (token_meter/app.py:5000):runner([cli_path, "mcp", "get", AGENT_ACCESS_SERVER, "--json"], ...), plainsubprocess.runwith no window-hiding options. Same gap as #19, different call site. If Codex CLI is installed, every dashboard load spawns it in a visible console.Fix: route this
subprocess.runcall throughWindowsPlatformServices.process_options()(token_meter/platforms/windows.py:62) forCREATE_NO_WINDOWon Windows, same as #19. Worth also considering callingloadAgentAccess()only when the settings panel is opened, since/agent-access/statuscurrently runs unconditionally on every load.Environment
codex-x86_64-pc-windows-msvc.exe)