collie icon indicating copy to clipboard operation
collie copied to clipboard

Windows + herdr-core: Claude panes never get a session (no Chat/History) because beacon emit has no start-time probe

Open EricSanzLuna opened this issue 2 weeks ago • 1 comments

What happened, and what did you expect?

This is #647 on Windows. On herdr-core, a Claude Code pane never gets its session, so the phone shows no Chat and no History, and the pane reads "claude has not registered any session in Herdr" (in Spanish on my phone). The Claude hooks are installed (collie hooks install claude), and the pane has HC_TERMINAL_ID and HC_TERMINAL_SOCKET set.

collie beacon emit runs on every event and exits 0, but it writes no beacon. I fed it a UserPromptSubmit payload by hand from inside the pane, with the real session_id and transcript_path. It exited 0, and nothing new appeared under ~/.local/state/collie. The doctor row says why:

beacons: no agent writes one on this platform, because Collie cannot read a process's start time here → nothing to do here: only Linux and macOS have that probe

The phone's hint, herdr integration install claude, does not help here. That integration reports to the Herdr TUI server (herdr pane report-agent-session, and only when HERDR_PANE_ID is set). herdr-core has no equivalent.

Expected: the same as #647 after 1.25.5. Chat and History open for a herdr-core Claude pane on Windows.

Start-time probe on Windows. You asked for a sample of the probe output on macOS, so here it is for Windows. Both commands give the same value for the same pid:

(Get-Process -Id <pid>).StartTime.ToUniversalTime().ToString('o')
2026-11-16T16:48:59.0812960Z      # ~2.9 s, including powershell startup

(Get-CimInstance Win32_Process -Filter 'ProcessId=<pid>').CreationDate.ToUniversalTime().ToString('o')
2026-11-16T16:48:59.0812960Z      # ~5.2 s

The cost is starting PowerShell. On this machine it takes 3 to 5 s, and up to 30 s under load (see #762). That is a lot for a hook that runs on every Claude event, so a probe that doesn't spawn PowerShell would be better if one is available. One option is GetProcessTimes through a native call. Another is to skip the start-time identity on Windows and match by pid plus HC_TERMINAL_ID.

Smaller alternative. Accept a claude.session_file (or claude.session_id) terminal label as a discovery hint, as the omp/pi label already works on herdr-core (#675, ADR 0024). Right now the hint is only read for PI_BINARIES. With that, a one-line SessionStart hook (hc label $env:HC_TERMINAL_ID claude.session_file=<transcript_path>) would be enough on Windows.

Related: herdrdev/herdr-core#15, which asks the core to keep a per-terminal session as Herdr 1 does. If that lands, neither workaround is needed.

Happy to test an Edge build on Windows.

Output of collie doctor --json

Relevant rows only, home folder redacted. I can paste the full JSON if you need it.

collie                1.28.4+684ddb49a3 · windows-x64
mux                   herdr-core, set by COLLIE_MUX
hc-socket             \\.\pipe\herdr-core-<user>-default.sock: herdr-core 0.1.21, 10 live terminals
hc-version            hc 0.1.21
beacon-hooks-claude   v1 in 1 settings file, running `C:\Users\<user>\AppData\Local\collie\current\bin\collie.exe`; herdr-core names agents itself, so they give hook edges and each Claude pane's session (its History)
beacons               skipped: no agent writes one on this platform, because Collie cannot read a process's start time here
agent-sessions        error: 5 agent pane(s) ... 1 report NO session: t1d5 (claude) — their History link and icon are hidden
harness-claude        Claude Code 2.1.325

Windows 11 Pro 10.0.26300, herdr-app 0.1.15.

EricSanzLuna avatar Nov 16 '26 16:11 EricSanzLuna

Thanks @EricSanzLuna, this is fixed in 1.29.0. Collie now reads a process's start time on Windows from the system itself, in well under a millisecond and without starting PowerShell, so Claude Code's hook writes its session note and a Claude pane on the Herdr core gets its Chat and History. Please update, and if it comes back you can reopen the issue.

AltanS avatar Nov 18 '26 09:11 AltanS