{"record":{"id":"531ef2379c924e85","repo":"diegosouzapw/OmniRoute","slug":"kiro-max-iterations-reached-in-event-parsing","errorCode":null,"errorMessage":"[Kiro] Max iterations reached in event parsing","messagePattern":"\\[Kiro\\] Max iterations reached in event parsing","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"open-sse/executors/kiro.ts","lineNumber":952,"sourceCode":"                  // input/output totals. Preserve them instead of dropping the\n                  // whole frame, and let ensureKiroUsage() fill the totals from\n                  // contextUsagePercentage.\n                  state.usage = {\n                    ...(state.usage || {}),\n                    ...((cacheReadTokens || 0) > 0 && {\n                      cache_read_input_tokens: cacheReadTokens,\n                    }),\n                    ...((cacheCreationTokens || 0) > 0 && {\n                      cache_creation_input_tokens: cacheCreationTokens,\n                    }),\n                  };\n                }\n              }\n            }\n          }\n\n          if (iterations >= maxIterations) {\n            console.warn(\"[Kiro] Max iterations reached in event parsing\");\n          }\n        },\n\n        flush(controller) {\n          if (!flushPendingWrapperToolCalls(controller)) return;\n          if (state.invalidToolCall) return;\n          // Flush any buffered tool arguments (partial-object payloads) before finishing —\n          // idempotent against toolArgsEmitted if messageStopEvent already flushed them.\n          flushBufferedToolArgs(state, controller, { responseId, created, model });\n\n          // Drain any pending inline-thinking tag fragment so we don't drop\n          // trailing characters when the stream ends mid-tag (e.g. `<thi`).\n          if (thinkingExpected && state.thinking) {\n            const thinkingState = state.thinking;\n            flushPendingThinking(\n              thinkingState,\n              (text) => {\n                if (!text) return;","sourceCodeStart":934,"sourceCodeEnd":970,"githubUrl":"https://github.com/diegosouzapw/OmniRoute/blob/a179ffed5bb2e0b883b9ae7214ce8717b2a94c4d/open-sse/executors/kiro.ts#L934-L970","documentation":"Error \"[Kiro] Max iterations reached in event parsing\" thrown in diegosouzapw/OmniRoute.","triggerScenarios":"Thrown at open-sse/executors/kiro.ts:952 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"}