{"record":{"id":"fe12a6699bd6b83a","repo":"diegosouzapw/OmniRoute","slug":"hyperagent-configure-thread-http-res-status","errorCode":null,"errorMessage":"HyperAgent configure thread HTTP ${res.status}: ${errText.slice(0, 300) || res.statusText}","messagePattern":"HyperAgent configure thread HTTP (.+?): (.+?)","errorType":"http","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"open-sse/executors/hyperagent.ts","lineNumber":619,"sourceCode":"    runtimeId: opts.runtimeId || \"claude-agents-sdk\",\n  };\n  // \"auto\" = execution-style agent loop (validated). null clears. Never \"plan\".\n  if (opts.executionMode === \"auto\") body.executionMode = \"auto\";\n  else if (opts.executionMode === null) body.executionMode = null;\n\n  const res = await fetch(`${ORIGIN}/api/threads/${encodeURIComponent(threadId)}`, {\n    method: \"PATCH\",\n    headers: browserHeaders(cookie, {\n      \"content-type\": \"application/json\",\n      \"x-request-id\": randomUUID(),\n      referer: `${ORIGIN}/thread/${threadId}`,\n    }),\n    body: JSON.stringify(body),\n    signal: signal ?? undefined,\n  });\n  if (!res.ok) {\n    const errText = await res.text().catch(() => \"\");\n    throw new Error(\n      `HyperAgent configure thread HTTP ${res.status}: ${errText.slice(0, 300) || res.statusText}`\n    );\n  }\n}\n\nexport function extractThreadIdFromUrl(url: string): string {\n  if (!url) return \"\";\n  const m = url.match(/\\/thread\\/([A-Za-z0-9_-]{10,})/i) || url.match(/(cm[a-z0-9]{20,})/i);\n  return m ? m[1]! : \"\";\n}\n\n/**\n * Default feature flags from live SPA **execution-mode** chat body.\n *\n * Important differences from older plan-mode captures:\n * - Do NOT set injectPlanMode (plan mode). Execution omits the field entirely.\n * - Do NOT put modelId/model here — model is PATCH'd onto the thread first.\n * - enabledIntegrations: [] — no connectors; integrationMode stays \"open\" like SPA.","sourceCodeStart":601,"sourceCodeEnd":637,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/hyperagent.ts#L601-L637","documentation":"Error \"HyperAgent configure thread HTTP ${res.status}: ${errText.slice(0, 300) || res.statusText}\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/hyperagent.ts:619 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"}