Skip to content

Agent initialization failing with Cursor CLI #48

@dbrogan-OSI

Description

@dbrogan-OSI

Only authenticated with Cursor, had successful initialization at first iterating over the specification file. Now the following is error is hit after starting a new task on the same machine:

[ERROR] Agent 8 (init) failed after 1917ms: Cursor CLI exited with code 1
Workflow execution failed: 176 | `).length}`),WB(`Cursor runner - args count: ${h.length}, model: ${g??"auto"}`);let y;try{y=await ND({command:x,args:h,cwd:C,env:v,stdinInput:I,onStdout:W?void 0:(DA)=>{let s=O(DA).trim().split(`
177 | `);for(let c of s){if(!c.trim())continue;let i=Mk(c);if(i)R?.(i+`
178 | `)}},onStderr:W?void 0:(DA)=>{let QA=O(DA);if(QA.includes("ConnectError: [invalid_argument]")||QA.includes("Error ="))M?.(`\u26A0\uFE0F  Cursor Error: This is commonly related to plan mode. You may need to check if you're in plan mode to use pro models.
179 | `);M?.(QA)},signal:N,stdioMode:W?"inherit":"pipe",timeout:L})}catch(DA){let QA=DA,s=QA?.message??"";if(QA?.code==="ENOENT"||/not recognized as an internal or external command/i.test(s)||/command not found/i.test(s)){let i=`${x} ${h.join(" ")}`.trim(),l=yE.installCommand,d=yE.name;throw console.error(`[ERROR] ${d} CLI not found when executing: ${i}`),Error(`'${x}' is not available on this system. Please install ${d} first:
180 |   ${l}`)}throw DA}if(y.exitCode!==0){let QA=(y.stderr.trim()||y.stdout.trim()||"no error output").split(`
181 | `),command:`${x} ${h.join(" ")}`}),Error(`Cursor CLI exited with code ${y.exitCode}`)}return{stdout:y.stdout,stderr:y.stderr}}var Rk,E6,T4="";var D6=n(()=>{A2();I6();S4();Q0();YD();XE();Rk=new RegExp(String.raw`\u001B\[[0-9;?]*[ -/]*[@-~]`,"g"),E6=new Map});var u5=n(async()=>{D6();B2();await C2()});var F6=n(async()=>{I6();u5();D6()});var vF,bx;var x5=n(()=>{vF={AUTO:"auto",CHEETAH:"cheetah",SONNET_4_5:"sonnet-4.5",SONNET_4_5_THINKING:"sonnet-4.5-thinking",GPT_5:"gpt-5",GPT_5_CODEX:"gpt-5-codex",OPUS_4_1:"opus-4.1",GROK:"grok"},bx={"gpt-5-codex":vF.GPT_5_CODEX,"gpt-4":vF.GPT_5,"gpt-4-turbo":vF.GPT_5,"gpt-3.5-turbo":vF.CHEETAH,"o1-preview":vF.OPUS_4_1,"o1-mini":vF.SONNET_4_5,sonnet:vF.SONNET_4_5,"claude-sonnet-4.5":vF.SONNET_4_5,opus:vF.OPUS_4_1}});var b5;var h5=n(async()=>{S4();Q6();await F6();Q6();x5();F6();b5={metadata:yE,auth:B6,run:C6}});var NC;var P4=n(()=>{NC={id:"ccr",name:"Claude Code Router",description:"Authenticate with Claude Code Router",cliCommand:"ccr",cliBinary:"ccr",installCommand:"npm install | ... truncated 

error: Cursor CLI exited with code 1
      at C6 (/$bunfs/root/runner-process.js:181:41)
      at async run (/$bunfs/root/runner-process.js:272:2227)
      at async N5 (/$bunfs/root/runner-process.js:114:1228)
      at async h4 (/$bunfs/root/runner-process.js:299:2259)
      at async mz (/$bunfs/root/runner-process.js:624:6766)
      at async iz (/$bunfs/root/runner-process.js:645:1044)


✗ Workflow failed with exit code 1

CodeMachine v0.7.0
cursor-agent 2025.11.25-d5b3271
Ubuntu 24.04.2 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions