Skip to content

Windows: selecting a session flashes many Git console windows #3835

Description

@tienthanh1993

Bug

Selecting a session in the Windows desktop app launches a burst of transient Git console hosts. Users see many shell/Windows Terminal windows flash and immediately exit.

Source: local user report in Codex chat | Reported by: local Windows user | Analyzed against: cfbefa4cdbd5e8c8e020177e53d105f10e5f44ee
AO version: bundled daemon reports dev, loopback daemon verified ready on port 3001
Confidence: High
Priority: medium — routine session navigation is visually disruptive, but sessions and data remain intact

Reproduction

  1. Run the packaged Agent Orchestrator desktop app on Windows.
  2. Open a project with two existing worker sessions.
  3. Alternate between the two sessions in the sidebar.
  4. Observe transient console/Windows Terminal windows appearing and exiting.

A 10 ms process-parent trace while switching sessions reproduced the behavior consistently. The burst contained git.exe children whose parent was the AO daemon, followed by conhost.exe children and OpenConsole.exe instances. Unrelated Docker Desktop console activity was excluded by parent PID.

Root Cause

Selecting a session mounts the inspector's workspace-file subscription. The frontend opens:

GET /api/v1/sessions/{sessionId}/workspace/events

The controller calls workspacewatch.Watch, whose Git discovery and ignore probes in backend/internal/workspacewatch/watcher.go use raw os/exec.CommandContext. On Windows these non-interactive Git children do not receive AO's CREATE_NO_WINDOW / HideWindow process attributes, so each Git command receives a console host. Initial discovery runs several Git commands (rev-parse, ls-files, common-dir and symbolic-ref), which makes one navigation action look like many shells spawning and exiting.

Fix

Route every background Git command in workspacewatch through backend/internal/process.CommandContext, and add a Windows regression test that asserts the workspace watcher command factory sets CREATE_NO_WINDOW and HideWindow.

Impact

  • Every session selection can flash multiple console windows on Windows.
  • Rapid navigation compounds the burst because each selected session establishes a new workspace watcher.
  • The issue is cosmetic/process-launch behavior; no session termination or data loss was observed.

Related

  • #1565 — also reports Windows console flashes, but only during ConPTY teardown; this defect occurs during normal session selection and is caused by AO background Git probes.

Metadata

Metadata

Labels

bugSomething isn't workingcomp/daemonGo daemon, process lifecycle, and backend control plane.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions