Error occurred while processing the request
Resolved 💬 1 comment Opened May 2, 2025 by rivershah Closed Aug 7, 2025
What version of Codex is running?
0.1.2504301751
Which model were you using?
o3
What platform is your computer?
Linux 5.10.0-34-cloud-amd64 x86_64 unknown
What steps can reproduce the bug?
Please see below error
file:///usr/lib/node_modules/@openai/codex/dist/cli.js:474
`,"\r"]);$g.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function LBe(e,t){for(let a=t??0;a<e.length;a++){if(e[a]===10)return{preceding:a,index:a+1,carriage:!1};if(e[a]===13)return{preceding:a,index:a+1,carriage:!0}}return null}function rse(e){for(let n=0;n<e.length-1;n++){if(e[n]===10&&e[n+1]===10||e[n]===13&&e[n+1]===13)return n+2;if(e[n]===13&&e[n+1]===10&&n+3<e.length&&e[n+2]===13&&e[n+3]===10)return n+4}return-1}m();function v7(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let r=await t.read();return r?.done&&t.releaseLock(),r}catch(r){throw t.releaseLock(),r}},async return(){let r=t.cancel();return t.releaseLock(),await r,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}var Od=class e{constructor(t,r){this.iterator=t,this.controller=r}static fromSSEResponse(t,r){let n=!1;async function*a(){if(n)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let i=!1;try{for await(let o of MBe(t,r))if(!i){if(o.data.startsWith("[DONE]")){i=!0;continue}if(o.event===null||o.event.startsWith("response.")||o.event.startsWith("transcript.")){let c;try{c=JSON.parse(o.data)}catch(d){throw console.error("Could not parse message into JSON:",o.data),console.error("From chunk:",o.raw),d}if(c&&c.error)throw new bi(void 0,c.error,void 0,I7(t.headers));yield c}else{let c;try{c=JSON.parse(o.data)}catch(d){throw console.error("Could not parse message into JSON:",o.data),console.error("From chunk:",o.raw),d}if(o.event=="error")throw new bi(void 0,c.error,c.message,void 0);yield{event:o.event,data:c}}}i=!0}catch(o){if(o instanceof Error&&o.name==="AbortError")return;throw o}finally{i||r.abort()}}return new e(a,r)}static fromReadableStream(t,r){let n=!1;async function*a(){let o=new $g,c=v7(t);for await(let d of c)for(let f of o.decode(d))yield f;for(let d of o.flush())yield d}async function*i(){if(n)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");n=!0;let o=!1;try{for await(let c of a())o||c&&(yield JSON.parse(c));o=!0}catch(c){if(c instanceof Error&&c.name==="AbortError")return;throw c}finally{o||r.abort()}}return new e(i,r)}[Symbol.asyncIterator](){return this.iterator()}tee(){let t=[],r=[],n=this.iterator(),a=i=>({next:()=>{if(i.length===0){let o=n.next();t.push(o),r.push(o)}return i.shift()}});return[new e(()=>a(t),this.controller),new e(()=>a(r),this.controller)]}toReadableStream(){let t=this,r,n=new TextEncoder;return new fO({async start(){r=t[Symbol.asyncIterator]()},async pull(a){try{let{value:i,done:o}=await r.next();if(o)return a.close();let c=n.encode(JSON.stringify(i)+`
e [Error]: An error occurred while processing the request.
at e.a [as iterator] (file:///usr/lib/node_modules/@openai/codex/dist/cli.js:474:1514)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async dE.run (file:///usr/lib/node_modules/@openai/codex/dist/cli.js:491:2777) {
status: undefined,
headers: undefined,
request_id: undefined,
error: {
type: 'server_error',
code: null,
message: 'An error occurred while processing the request.',
param: null
},
code: null,
param: null,
type: 'server_error'
}
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗