← Back to Kontasks
Error Analysis: Too Much Recursion
Analysis of "Failed to start request: too much recursion" error
Output
Error: Too Much Recursion
The Error
⚠ Failed to start request: too much recursion
What This Means
A JavaScript function called itself (or a chain of functions called each other) too many times, exceeding the browser's call stack limit.
Likely Causes
- State machine loop - dispatch() triggering another dispatch() in an effect handler
- EventSource handler - onerror triggering reconnect which triggers onerror
- Todo update loop - TodoWrite effect calling saveTodoProgress which triggers re-render
- Template string expansion - Unlikely but possible if getXxxScript() calls itself
Most Likely Culprit
The error appeared after "Done" was shown, suggesting it happened during:
- Starting a NEW request (you sent "Test" right after)
- The
dispatch({ type: 'send_prompt' })call - An effect handler that re-dispatched recursively
Next Steps
I should check the state machine's effect handlers and the sendPrompt function for recursive dispatch calls. Would you like me to investigate?
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
consoledebuggingerror
Created
2 Jan 2026, 9:54 pm
Updated
2 Jan 2026, 9:54 pm
Created By
claude
Raw Data
{
"id": "e35d1c0b-5232-4e20-9199-e180a920e849",
"type": "general",
"status": "completed",
"title": "Error Analysis: Too Much Recursion",
"description": "Analysis of \"Failed to start request: too much recursion\" error",
"context": {
"output": "<div style=\"background:#1e1e1e;color:#e0e0e0;padding:20px;border-radius:8px;font-family:'Consolas','Monaco',monospace;\"><h2 style=\"font-family:sans-serif;color:#fff;margin:0 0 16px 0;\">Error: Too Much Recursion</h2><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h4 style=\"margin:0 0 12px 0;color:#f44336;\">The Error</h4><pre style=\"background:#252526;padding:12px;border-radius:4px;color:#f44336;margin:0;overflow-x:auto;\">⚠ Failed to start request: too much recursion</pre></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h4 style=\"margin:0 0 12px 0;color:#fff;\">What This Means</h4><p style=\"margin:0;color:#e0e0e0;\">A JavaScript function called itself (or a chain of functions called each other) too many times, exceeding the browser's call stack limit.</p></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h4 style=\"margin:0 0 12px 0;color:#e5c07b;\">Likely Causes</h4><ul style=\"margin:0;padding-left:20px;color:#e0e0e0;line-height:1.8;\"><li><strong>State machine loop</strong> - dispatch() triggering another dispatch() in an effect handler</li><li><strong>EventSource handler</strong> - onerror triggering reconnect which triggers onerror</li><li><strong>Todo update loop</strong> - TodoWrite effect calling saveTodoProgress which triggers re-render</li><li><strong>Template string expansion</strong> - Unlikely but possible if getXxxScript() calls itself</li></ul></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h4 style=\"margin:0 0 12px 0;color:#61afef;\">Most Likely Culprit</h4><p style=\"margin:0 0 12px 0;color:#e0e0e0;\">The error appeared after \"Done\" was shown, suggesting it happened during:</p><ol style=\"margin:0;padding-left:20px;color:#e0e0e0;line-height:1.8;\"><li>Starting a NEW request (you sent \"Test\" right after)</li><li>The <code>dispatch({ type: 'send_prompt' })</code> call</li><li>An effect handler that re-dispatched recursively</li></ol></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;\"><h4 style=\"margin:0 0 8px 0;color:#fff;\">Next Steps</h4><p style=\"margin:0;color:#9ca3af;\">I should check the state machine's effect handlers and the sendPrompt function for recursive dispatch calls. Would you like me to investigate?</p></div></div>",
"requestedAt": "2026-01-02T11:58:00.000Z",
"requestId": "621ac4c1-13e8-48c8-85a8-abc9d96b0945"
},
"createdBy": "claude",
"createdAt": "2026-01-02T11:54:16.094Z",
"updatedAt": "2026-01-02T11:54:16.242Z",
"requestId": "621ac4c1-13e8-48c8-85a8-abc9d96b0945",
"scope": "vibetools",
"tags": [
"console",
"debugging",
"error"
],
"targetUser": "claude"
}