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 Cursor agent (.cmd) cannot launch with prompt in argv — asks to Remove {prompt} #8793
On Windows, launching Cursor Agent with an initial prompt fails with:
Cursor cannot be run as a Windows batch command with the prompt in argv. Remove {prompt} so Orca sends the prompt on stdin.
Orca blocks startup instead of delivering the prompt. Built-in Cursor uses promptInjectionMode: argv, but the installed CLI resolves to a .cmd shim (agent.cmd / cursor-agent.cmd), so argv prompt injection is rejected.
What happened?
Default TUI agent is Cursor.
Cursor command override points at the Windows installer alias agent (resolves to %LOCALAPPDATA%\cursor-agent\agent.cmd).
Starting a worktree / terminal with an initial prompt (or any path that puts the prompt in argv) shows the error above.
The agent does not start with the intended prompt.
Expected: Orca should still start Cursor on Windows and deliver the prompt (e.g. via stdin-after-start, or by invoking agent.ps1 / cursor-agent.ps1 through PowerShell -File so argv is not mangled by cmd.exe%*).
How can we reproduce it?
On Windows, install Cursor Agent CLI so agent / cursor-agent resolve to .cmd shims under %LOCALAPPDATA%\cursor-agent\.
In Orca, set default agent to Cursor (optionally override command to agent).
Create a worktree or launch Cursor with an initial prompt (automation / worktree --prompt / any UI that injects a startup prompt).
Observe the error: Cursor cannot be run as a Windows batch command with the prompt in argv. Remove {prompt} so Orca sends the prompt on stdin.
Host context: Windows 11 / Orca 1.4.143.0 / repo path used: docs/bug-reproductions/ Labels applied: see issue labels (has_repro or cannot_repro). Security: Do not run user-uploaded binaries from issue attachments. Recreate fixtures from the steps/scripts below.
Issue 8793 — Windows Cursor agent (.cmd) cannot launch with prompt in argv
Status:repro_confirmed (logic/API) + needs_setup for full UI (Cursor agent.cmd not installed) Label:has_repro Host: Windows 11; Cursor agent.cmdnot present under %LOCALAPPDATA%\cursor-agent
Summary
Orca rejects Windows batch shims (.cmd/.bat) when the prompt is delivered via argv/{prompt}:
<cmd-path> cannot be run as a Windows batch command with the prompt in argv. Remove {prompt} so Orca sends the prompt on stdin.
Source: src/main/text-generation/commit-message-text-generation.ts (+ unit test pin). Cursor Agent on Windows commonly resolves to agent.cmd, while the Cursor preset uses promptInjectionMode: 'argv'.
Logic repro (another agent)
# From repo root (Node only; no deps required for this check)
node docs/bug-reproductions/scripts/repro-8793-cursor-cmd-argv.mjs
# Or inspect evidence already written:Get-ChildItem docs/bug-reproductions/evidence/8793-*.json |Sort-Object LastWriteTime |Select-Object-Last 1
Confirmed behavior matrix:
Path
Delivery
Result
agent.cmd
argv
Rejected with error string
agent.cmd
stdin
Allowed
agent.exe
argv
Allowed
Full UI repro (needs Cursor Agent CLI)
Install Cursor Agent so agent / cursor-agent resolves to %LOCALAPPDATA%\cursor-agent\agent.cmd.
/** * Repro / unit-level confirmation for https://github.com/stablyai/orca/issues/8793 * * The exact user-facing error string lives in commit-message text generation when * a Windows `.cmd` agent path is used with `{prompt}` / argv delivery. * * This script: * 1. Greps the source for the error factory * 2. Re-implements the batch-script + argv guard logic * 3. Optionally runs the vitest that already pins the error string * * Usage (repo root): * node docs/bug-reproductions/scripts/repro-8793-cursor-cmd-argv.mjs */import{spawnSync}from'node:child_process'import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs'import{dirname,join}from'node:path'import{fileURLToPath}from'node:url'const__dirname=dirname(fileURLToPath(import.meta.url))constrepoRoot=join(__dirname,'..','..','..')constevidenceDir=join(__dirname,'..','evidence')mkdirSync(evidenceDir,{recursive: true})conststamp=newDate().toISOString().replace(/[:.]/g,'-')constlogPath=join(evidenceDir,`8793-${stamp}.log`)constlines=[]constlog=(m)=>{constline=`[${newDate().toISOString()}] ${m}`lines.push(line)console.log(line)}functionisWindowsBatchScript(commandPath){returnprocess.platform==='win32'&&/\.(cmd|bat)$/i.test(commandPath)}functionwindowsBatchArgvPromptError(label){return`${label} cannot be run as a Windows batch command with the prompt in argv. Remove {prompt} so Orca sends the prompt on stdin.`}// Mirror of the guard used by commit-message pathfunctionwouldReject(commandPath,promptDelivery){if(promptDelivery==='argv'&&isWindowsBatchScript(commandPath)){returnwindowsBatchArgvPromptError(commandPath)}returnnull}log('=== Issue 8793: Windows .cmd + argv prompt rejected ===')log(`platform=${process.platform}`)constsrc=join(repoRoot,'src/main/text-generation/commit-message-text-generation.ts')consttestSrc=join(repoRoot,'src/main/text-generation/commit-message-text-generation.test.ts')log(`source exists: ${existsSync(src)}`)constbody=readFileSync(src,'utf8')consthasError=body.includes('cannot be run as a Windows batch command with the prompt in argv')log(`error factory present: ${hasError}`)constcases=[{path: 'C:/Users/me/AppData/Local/cursor-agent/agent.cmd',delivery: 'argv'},{path: 'C:/Users/me/AppData/Local/cursor-agent/agent.cmd',delivery: 'stdin'},{path: 'C:/tools/cursor-agent.exe',delivery: 'argv'},{path: 'agent',delivery: 'argv'}]constcaseResults=cases.map((c)=>({
...c,error: wouldReject(c.path,c.delivery)}))for(constcofcaseResults){log(`path=${c.path} delivery=${c.delivery} -> ${c.error??'(allowed)'}`)}// Confirm vitest still pins this behavior (may take a bit)log('Running focused vitest (may take ~1-2 min)...')constvt=spawnSync(process.platform==='win32' ? 'pnpm.cmd' : 'pnpm',['exec','vitest','run','src/main/text-generation/commit-message-text-generation.test.ts','-t','Windows batch'],{cwd: repoRoot,encoding: 'utf8',shell: true,timeout: 180000})log(`vitest status=${vt.status}`)if(vt.stdout)log(vt.stdout.slice(-2000))if(vt.stderr)log(vt.stderr.slice(-1000))// Host PATH check for real Cursor agentconstwhich=spawnSync('where.exe',['agent.cmd'],{encoding: 'utf8',shell: true})constcursorAgentCmd=(which.stdout||'').trim().split(/\r?\n/).filter(Boolean)log(`where agent.cmd: ${cursorAgentCmd.join(' | ')||'(none)'}`)constlocalApp=join(process.env.LOCALAPPDATA||'','cursor-agent')log(`%LOCALAPPDATA%\\cursor-agent exists: ${existsSync(localApp)}`)constbugLogicConfirmed=hasError&&caseResults[0].error!==null&&caseResults[1].error===null&&caseResults[2].error===nullconstout={issue: 8793,
stamp,
bugLogicConfirmed,fullUiRepro: cursorAgentCmd.length>0,
caseResults,vitestStatus: vt.status,
cursorAgentCmd,log: logPath,note:
'Logic-level repro: Orca intentionally rejects .cmd + argv prompt. Full UI repro needs Cursor agent.cmd install + worktree --prompt.'}writeFileSync(join(evidenceDir,`8793-${stamp}.json`),JSON.stringify(out,null,2))writeFileSync(logPath,lines.join('\n'))log(`bugLogicConfirmed=${bugLogicConfirmed}`)process.exit(bugLogicConfirmed ? 0 : 2)
How another agent should use this
Read this comment fully (status, expected vs actual, blockers).
If a script is included above, copy it to a temp file and run it on a Windows 11 host with Orca installed (prefer production install under %LOCALAPPDATA%\Programs\orca).
Capture evidence (CLI --json, screenshots, logs) under a local folder; optionally comment results back here.
If status is cannot_repro / needs_setup, satisfy the listed prerequisites first, then re-attempt and flip labels: remove cannot_repro, add has_repro when conclusive.
Activity
OrcaWin commentedon Jul 17, 2026
Agent reproduction package (Windows orchestration 2026-07-16)
Host context: Windows 11 / Orca 1.4.143.0 / repo path used:
docs/bug-reproductions/Labels applied: see issue labels (
has_reproorcannot_repro).Security: Do not run user-uploaded binaries from issue attachments. Recreate fixtures from the steps/scripts below.
Issue 8793 — Windows Cursor agent (.cmd) cannot launch with prompt in argv
Status:
repro_confirmed(logic/API) +needs_setupfor full UI (Cursor agent.cmd not installed)Label:
has_reproHost: Windows 11; Cursor
agent.cmdnot present under%LOCALAPPDATA%\cursor-agentSummary
Orca rejects Windows batch shims (
.cmd/.bat) when the prompt is delivered via argv/{prompt}:Source:
src/main/text-generation/commit-message-text-generation.ts(+ unit test pin). Cursor Agent on Windows commonly resolves toagent.cmd, while the Cursor preset usespromptInjectionMode: 'argv'.Logic repro (another agent)
Confirmed behavior matrix:
agent.cmdagent.cmdagent.exeFull UI repro (needs Cursor Agent CLI)
agent/cursor-agentresolves to%LOCALAPPDATA%\cursor-agent\agent.cmd.agent.Evidence
docs/bug-reproductions/evidence/8793-*.json(bugLogicConfirmed: true)Repro script:
repro-8793-cursor-cmd-argv.mjsHow another agent should use this
%LOCALAPPDATA%\Programs\orca).--json, screenshots, logs) under a local folder; optionally comment results back here.cannot_repro/ needs_setup, satisfy the listed prerequisites first, then re-attempt and flip labels: removecannot_repro, addhas_reprowhen conclusive.chore(agents): restore why-comments and argv separator readability (s…
fix(agents): keep Windows Cursor startup prompts out of argv (stablya…
fix(agents): resolve omitted source-control platform fallback (stably…
chore(agents): restore argv separator readability and why-comments (s…