{"record":{"id":"cd304504f4c1fda1","repo":"diegosouzapw/OmniRoute","slug":"claude-web-stream-ended-without-a-terminal-event","errorCode":null,"errorMessage":"Claude Web stream ended without a terminal event","messagePattern":"Claude Web stream ended without a terminal event","errorType":"exception","errorClass":"ClaudeWebProtocolError","httpStatus":null,"severity":"error","filePath":"open-sse/executors/claude-web/stream.ts","lineNumber":720,"sourceCode":"}\n\nasync function pullStreamingChunk(\n  state: StreamingState,\n  options: ClaudeWebStreamOptions,\n  controller: ReadableStreamDefaultController<Uint8Array>\n): Promise<void> {\n  if (state.closed || flushStreamChunk(state, controller)) return;\n  if (state.terminal) {\n    closeStreamIfDrained(state, controller);\n    return;\n  }\n\n  try {\n    while (!state.terminal) {\n      const next = await state.iterator.next();\n      if (state.control.cancelled) return;\n      if (next.done === true) {\n        throw new ClaudeWebProtocolError(\"Claude Web stream ended without a terminal event\");\n      }\n      await queueSemanticEvent(state, next.value, options);\n      if (state.pendingChunks.length > 0) {\n        flushStreamChunk(state, controller);\n        return;\n      }\n    }\n  } catch {\n    if (state.control.cancelled) return;\n    queueStreamFailure(state, options);\n    flushStreamChunk(state, controller);\n  }\n}\n\nasync function cancelStreaming(\n  state: StreamingState,\n  options: ClaudeWebStreamOptions,\n  reason: unknown","sourceCodeStart":702,"sourceCodeEnd":738,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/claude-web/stream.ts#L702-L738","documentation":"Error \"Claude Web stream ended without a terminal event\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/claude-web/stream.ts:720 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"}