{"record":{"id":"c782f22b6af55c71","repo":"diegosouzapw/OmniRoute","slug":"cursor-get-agent-failed-response-status-erro","errorCode":null,"errorMessage":"Cursor get agent failed: ${response.status} ${error}","messagePattern":"Cursor get agent failed: (.+?) (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/lib/cloudAgent/agents/cursor.ts","lineNumber":115,"sourceCode":"      status: this.mapCursorStatus(data.status),\n      prompt: params.prompt,\n      source: params.source,\n      options: params.options,\n      activities: [],\n      createdAt: new Date().toISOString(),\n      updatedAt: new Date().toISOString(),\n    };\n  }\n\n  async getStatus(externalId: string, credentials: AgentCredentials): Promise<GetStatusResult> {\n    const response = await fetch(\n      `${this.resolveBaseUrl(credentials)}/agents/${encodeURIComponent(externalId)}`,\n      { headers: this.authHeaders(credentials) }\n    );\n\n    if (!response.ok) {\n      const error = await response.text();\n      throw new Error(`Cursor get agent failed: ${response.status} ${error}`);\n    }\n\n    const data = await response.json();\n    const status = this.mapCursorStatus(data.status);\n\n    const conversation = Array.isArray(data.conversation) ? data.conversation : [];\n    const activities: CloudAgentActivity[] = conversation.map((msg: Record<string, unknown>) => ({\n      id: this.generateActivityId(),\n      type: \"message\" as const,\n      content: typeof msg.text === \"string\" ? msg.text : \"\",\n      timestamp: (msg.createdAt as string) || new Date().toISOString(),\n    }));\n\n    let result;\n    if (status === CLOUD_AGENT_STATUS.COMPLETED) {\n      const target = (data.target as Record<string, unknown>) || {};\n      result = {\n        prUrl: (target.prUrl as string) || (target.url as string) || undefined,","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/src/lib/cloudAgent/agents/cursor.ts#L97-L133","documentation":"Error \"Cursor get agent failed: ${response.status} ${error}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at src/lib/cloudAgent/agents/cursor.ts:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d","analyzedAt":"2026-08-25T18:35:09.898Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}