fix(launch): cursor-agent headless dispatch hang on Windows - #544
Merged
Conversation
run_captured no longer unconditionally applies CREATE_NO_WINDOW on Windows. That flag breaks cursor-agent's .cmd -> powershell.exe -> node.exe shim chain (0 output, idle timeout, never replies). run_headless now routes script shims through powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden which provides the real console cursor-agent needs while keeping the window hidden. Native .exe agents still get CREATE_NO_WINDOW. - run_captured: removes unconditional CREATE_NO_WINDOW (Windows) - run_headless: adds script_shim_launcher + launch_command to route .ps1 (and .cmd/.bat with sibling .ps1) through powershell.exe -WindowStyle Hidden -File; native .exe still get CREATE_NO_WINDOW Verified: run_headless(cursor, --force, ok) returns Ok(ok\n) in ~27s with no terminal flash. Fixes cursor e2e dispatch hang (item #502). Agentflare-Agent: 1 Agentflare-Branch: fix/cursor-headless-console-hang
|
Caution Review failedAn error occurred during the review process. Please try again later. Comment |
The hidden_console flag from launch_command is only consumed under #[cfg(windows)] (the CREATE_NO_WINDOW decision). On Linux/macOS it was an unused variable, which the CI clippy gate (-D warnings) rejects. Agentflare-Agent: 1 Agentflare-Branch: fix/cursor-headless-console-hang
…-console-hang Agentflare-Agent: 1 Agentflare-Branch: fix/cursor-headless-console-hang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
un_captured no longer unconditionally applies CREATE_NO_WINDOW on Windows. That flag breaks cursor-agent's .cmd -> powershell.exe ->
ode.exe shim chain (0 output, idle timeout, never replies).
un_headless now routes script shims through
powershell.exe -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden
which provides the real console cursor-agent needs while keeping the
window hidden. Native .exe agents still get CREATE_NO_WINDOW.
Changes
un_captured: removes unconditional CREATE_NO_WINDOW (Windows)
un_headless: adds script_shim_launcher + launch_command to route
.ps1 (and .cmd/.bat with sibling .ps1) through
powershell.exe -WindowStyle Hidden -File; native .exe still get
CREATE_NO_WINDOW
Verification
un_headless("cursor", "--force", "ok") returns Ok("ok\n")
in ~27s with no terminal flash.
Fixes
Item #502: cursor e2e dispatch hang (cursor-agent dispatch hangs at sdd_loop with no process, no output, no error surfaced).