Skip to content

fix(launch): cursor-agent headless dispatch hang on Windows - #544

Merged
getappz merged 3 commits into
masterfrom
fix/cursor-headless-console-hang
Aug 17, 2026
Merged

fix(launch): cursor-agent headless dispatch hang on Windows#544
getappz merged 3 commits into
masterfrom
fix/cursor-headless-console-hang

Conversation

@getappz

@getappz getappz commented Aug 17, 2026

Copy link
Copy Markdown
Owner

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.

  • cargo fmt --check clean
  • cargo clippy -p agentflare --all-targets -- -D warnings clean
  • 1373/1375 tests pass (2 pre-existing flakes unrelated)

Fixes

Item #502: cursor e2e dispatch hang (cursor-agent dispatch hangs at sdd_loop with no process, no output, no error surfaced).

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
@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Caution

Review failed

An error occurred during the review process. Please try again later.


Comment @coderabbitai help to get the list of available commands.

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
@getappz
getappz merged commit 4905c06 into master Aug 17, 2026
23 of 25 checks passed
@getappz
getappz deleted the fix/cursor-headless-console-hang branch August 17, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant