Repository navigation
Description
Summary
ORCH 1.0.27's Cursor adapter launches Cursor Agent print mode without a positional prompt and then writes the prompt to stdin. Cursor Agent CLI 2026.07.16 rejects that invocation immediately:
Error: No prompt provided for print mode
ORCH then reports only Cursor agent process exited with code 1 because the shared streaming helper never drains or includes stderr.
Environment
- ORCH: 1.0.27
- Cursor Agent CLI: 2026.07.16-899851b
- Node: v24.17.0
- Platform: Windows (
win32) - Cursor authentication: logged in
orch doctor: Cursor adapter detected successfully
Reproduction
This matches the current CursorAdapter.execute() transport:
"Reply with exactly OK" | cursor-agent -p --output-format stream-json --workspace "$PWD" --yoloResult:
Error: No prompt provided for print mode
exit 1
The equivalent documented positional-prompt form succeeds:
cursor-agent -p --output-format stream-json --workspace "$PWD" --yolo --trust "Reply with exactly OK"It emits normal system, user, assistant, and result stream-json events and exits successfully.
In a real project this caused 11/11 Cursor-backed task runs to fail at startup, with zero recorded tokens and empty run event logs.
Cause
The adapter currently builds arguments without the required [prompt...] positional argument:
const args = [
'-p',
'--output-format', 'stream-json',
'--workspace', params.workspace,
'--yolo',
];
spawn('cursor-agent', args, { stdio: ['pipe', 'pipe', 'pipe'] });
proc.stdin.write(buildFullPrompt(...));Current Cursor Agent help describes the prompt as a positional argument and does not expose a stdin or --prompt-file option.
Separately, createStreamingEvents() reads only stdout. It does not drain proc.stderr, so the actionable CLI error is discarded and a sufficiently chatty stderr stream can also fill the pipe buffer.
Suggested fix
- Append
buildFullPrompt(params.systemPrompt, params.prompt)as the final Cursor positional argument. - Add
--trustfor non-interactive fresh ORCH worktrees. - Use
stdio: ['ignore', 'pipe', 'pipe']for Cursor after moving the prompt. - Drain stderr in
createStreamingEvents(), retain a bounded tail, and append it to non-zero-exit/spawn errors. - Add adapter tests covering argument construction and stderr propagation.
A local compiled-bundle hotfix using those changes passed:
- direct Cursor adapter smoke test;
- a full 17,983-character assembled ORCH prompt;
- a real ORCH TUI task that rendered
CURSOR_ORCH_TUI_OKand transitioned to done; - a Codex control task that rendered
CODEX_ORCH_TUI_OKand transitioned to done.
Windows prompt-length caveat
Passing the complete prompt positionally is compatible with the tested 17,983-character prompt, but ORCH should account for Windows' process command-line ceiling for larger team/system prompts. Cursor Agent currently offers no prompt-file option, so a durable bridge/fallback may be required.
Additional verification finding
When the Cursor and Codex smoke tasks were first started simultaneously by the TUI, the Cursor task was marked failed while its run record remained stuck at preparing with no error or events. Retrying the exact same task alone succeeded. This installation also has historical Windows failures saving state.json via atomic temp-file rename (EPERM). That appears to be a separate concurrent state-write/observability race, but it surfaced while verifying this fix and may warrant a follow-up issue.
Activity
github-actions commentedon Jul 20, 2026
👋 Welcome to ORCH — thanks for opening your first issue!
We appreciate you taking the time to report this. Here are some helpful links:
If you'd like to fix this yourself, PRs are very welcome! We have 1493+ tests and strict TypeScript — the CI will guide you.
⭐ If you find ORCH useful, consider giving us a star — it helps others discover the project!
oxgeneral commentedon Jul 22, 2026
Fixed and released in v1.0.28.
The fix:
--trustfor fresh ORCH worktrees;Verification completed before release:
2026.07.20-8cc9c0b:todo → in_progress → review → done;The Windows command-line length caveat and the separate state-write race mentioned in the report are outside this fix and should be tracked independently if they remain reproducible.
Thank you for the detailed report and reproduction steps.