You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Windows agent hooks are wrapped in conhost.exe --headless, which breaks stdin and makes every Claude Code hook time out #15599
Short summary:
The hook entries Orca writes into ~/.claude/settings.json on Windows wrap the hook script in conhost.exe --headless. Under ConPTY the child's stdin is a console handle, not the pipe the agent CLI writes its JSON payload to, so the hook's curl blocks forever reading stdin and every hook invocation dies on the CLI's timeout.
What happened
A warning appeared under every prompt:
UserPromptSubmit hook timed out after 10s — output discarded.
Raise the hook's "timeout" to allow more time.
Orca installs this into ~/.claude/settings.json for all 11 hook events (SessionStart, UserPromptSubmit, Stop, StopFailure, SubagentStart, SubagentStop, TeammateIdle, PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest):
payload@- makes curl read stdin to EOF to build the request body. Launched under conhost --headless the child gets a pseudoconsole, so the agent's JSON never arrives and EOF never comes. --max-time 1.5 does not help: it bounds the transfer, and the transfer has not started yet while curl is still reading the body from stdin.
Or end to end: install Orca on Windows, launch Claude Code in an Orca pane, send any prompt, and the timeout warning appears under every message.
Impact
It is not only the visible UserPromptSubmit warning. PreToolUse, PostToolUse and PermissionRequest are registered with the same wrapper, so every single tool call stalls for the full hook timeout before proceeding. An agent doing dozens of tool calls runs many minutes slower than it should, and every Orca-side hook event is silently lost.
Working around it client-side does not stick: replacing command with cmd.exe and dropping the --headless wrapper fixes it immediately (0.06 s, hook delivered), but Orca rewrites ~/.claude/settings.json on the next app start and the breakage returns.
Expected
Either drop the conhost --headless wrapper on Windows for hooks whose stdin must be an inherited pipe, or stop feeding the payload through stdin.
Note that claude-hook.cmd already has a stdin-drain branch (more.com >nul when DEVIN_PROJECT_DIR is set), so the stdin-handling problem is partly anticipated — it just does not cover the ConPTY case.
Anything else that might help
%USERPROFILE%\.orca\agent-hooks\ also ships codex-hook.cmd and gemini-hook.cmd with the same curl-reads-stdin shape. I did not verify how those are invoked, so I do not know whether they hit the same wrapper.
Already fixed on main by #14825 (regression coverage in #15403). Same failure as #15416.
Windows managed Claude hooks no longer wrap claude-hook.cmd in conhost.exe --headless. That wrapper replaces the child's stdin with a pseudoconsole, so curl ... payload@- never sees Claude's JSON and every hook times out. On main the installer writes a hidden PowerShell command (-WindowStyle Hidden) that relays stdin, and the managed-hook cleanup sweeps stale conhost exec-form entries.
You reported this on 1.4.185. That GitHub release does not include this change yet; it is on main and should ship in the next release (we usually release within 48 hours). Please update when that lands. If a newer build still writes the conhost --headless form into ~/.claude/settings.json after one restart, say so here.
Your stdin analysis is spot-on — payload@- makes curl read stdin to EOF, but under conhost --headless the child gets a pseudoconsole whose stdin isn't the pipe the CLI writes to, so EOF never arrives and the 10s harness timeout fires. The --max-time 1.5 is a red herring because the transfer hasn't started while curl is still blocked reading stdin.
Root cause is Orca's Windows hook wrapper, which is why it hits all 11 events and won't repair by hand — Orca rewrites the entries on every start.
The fix that stuck for me was removing the polluted entries automatically: Coffee CLI cleans the Orca residue on launch (only Orca's entries, your hooks untouched, and it skips while Orca's running). After that every hook returned to normal, no more "timed out after 10s".
Confirmed fixed. Reporter here, verifying on the same machine.
Which release carries it: the merge commit of #14825 (02ba70a) is not an ancestor of the v1.4.186 tag, but is reachable from v1.4.187. So 1.4.186 still had the old behaviour and 1.4.187 is the first release with the fix.
I am now on 1.4.188. ~/.claude/settings.json contains zero occurrences of conhost — the managed-hook cleanup swept the stale exec-form entries on update, without me touching the file. The new entry decodes to exactly what you described:
Ran the actual hook command three times with a real UserPromptSubmit JSON payload on stdin:
run 1: 0.17s exit=0 stdout='{}'
run 2: 0.15s exit=0 stdout='{}'
run 3: 0.15s exit=0 stdout='{}'
Previously this hung until the harness killed it at the 10s timeout. Nothing further needed from my side — thanks for the quick turnaround.
For anyone landing here from the timeout message: updating to 1.4.187 or newer is sufficient. No manual edit of settings.json and no third-party cleanup tool is required — a hand patch would not survive anyway, since Orca rewrites these entries on every start.
Activity
OrcaWin commentedon Aug 20, 2026
Already fixed on
mainby #14825 (regression coverage in #15403). Same failure as #15416.Windows managed Claude hooks no longer wrap
claude-hook.cmdinconhost.exe --headless. That wrapper replaces the child's stdin with a pseudoconsole, socurl ... payload@-never sees Claude's JSON and every hook times out. Onmainthe installer writes a hidden PowerShell command (-WindowStyle Hidden) that relays stdin, and the managed-hook cleanup sweeps stale conhost exec-form entries.You reported this on 1.4.185. That GitHub release does not include this change yet; it is on
mainand should ship in the next release (we usually release within 48 hours). Please update when that lands. If a newer build still writes theconhost --headlessform into~/.claude/settings.jsonafter one restart, say so here.amomurawskiio425-cloud commentedon Aug 23, 2026
Your stdin analysis is spot-on —
payload@-makes curl read stdin to EOF, but underconhost --headlessthe child gets a pseudoconsole whose stdin isn't the pipe the CLI writes to, so EOF never arrives and the 10s harness timeout fires. The--max-time 1.5is a red herring because the transfer hasn't started while curl is still blocked reading stdin.Root cause is Orca's Windows hook wrapper, which is why it hits all 11 events and won't repair by hand — Orca rewrites the entries on every start.
The fix that stuck for me was removing the polluted entries automatically: Coffee CLI cleans the Orca residue on launch (only Orca's entries, your hooks untouched, and it skips while Orca's running). After that every hook returned to normal, no more "timed out after 10s".
Caveat: nothing Orca already deleted comes back, and if Orca is currently running cleanup won't engage. But the stdin/timeout half is genuinely solved. https://github.com/edison7009/Coffee-CLI/releases/tag/v3.3.8
BushLands commentedon Aug 24, 2026
Confirmed fixed. Reporter here, verifying on the same machine.
Which release carries it: the merge commit of #14825 (
02ba70a) is not an ancestor of thev1.4.186tag, but is reachable fromv1.4.187. So 1.4.186 still had the old behaviour and 1.4.187 is the first release with the fix.I am now on 1.4.188.
~/.claude/settings.jsoncontains zero occurrences ofconhost— the managed-hook cleanup swept the stale exec-form entries on update, without me touching the file. The new entry decodes to exactly what you described:Ran the actual hook command three times with a real
UserPromptSubmitJSON payload on stdin:Previously this hung until the harness killed it at the 10s timeout. Nothing further needed from my side — thanks for the quick turnaround.
For anyone landing here from the timeout message: updating to 1.4.187 or newer is sufficient. No manual edit of
settings.jsonand no third-party cleanup tool is required — a hand patch would not survive anyway, since Orca rewrites these entries on every start.