Windows: daemon named-pipe connection hangs 45s+ for any externally-launched process (Orca, VS Code, native PowerShell/cmd)
Environment: Windows 11, Claude Code 2.1.210 (native install)
Symptom: Any claude invocation from a freshly-launched process (any terminal app: Orca's integrated terminal, VS Code's integrated terminal, native PowerShell, native cmd.exe — all reproduced) hangs and fails after ~45s with:
Couldn't reach the background service (background service did not become reachable within 45s) — run 'claude daemon status'
What's confirmed working: claude daemon status run from any process that is a descendant of an already-connected Claude Code session (e.g. a Bash/PowerShell subprocess spawned by an active claude session) succeeds instantly, every time — including immediately after killing and recreating the daemon.
What's confirmed broken: the identical command from any externally/freshly-launched process — reproduced from a plain cmd.exe/PowerShell window opened directly from the Start menu, with zero IDE involvement — hangs the full 45s and fails, every time.
Localized to: the daemon.log shows the failing process's claude correctly discovers and defers to the existing daemon (clean lock-race handoff: another daemon won the lock race (pid=X) — exiting), so discovery/lock-file arbitration works. The hang happens in the subsequent step — opening the daemon's control named pipe (\.\pipe\cc-daemon-*-control) as a client — which times out only for processes outside the already-connected session's lineage.
Ruled out via extensive testing: app-specific bug (reproduced in 3 unrelated apps + native shells), stale/old daemon (fails even against a daemon seconds old), stale app version (reproduced after updating both Orca and VS Code to latest), stale/corrupted daemon auth keys (~/.claude/daemon/control.key and pipe.key regenerated fresh — still fails), WireGuard/VPN interference (not running at time of test), and OS-level state corruption (persists across a full system reboot).
Happy to provide daemon.log excerpts or run further diagnostics if useful.