← Back to Kontasks
SSE Recovery Issue - Root Cause Found & Fixed
Output
🔧 SSE Recovery Bug Investigation Complete
Root Cause
The pollForOutput() function was crashing with TypeError: can't access property "filter", todos is undefined because the fix from earlier wasn't deployed - konui needed to be restarted.
Evidence from Logs
Before restart (08:16-08:17):
Poll error: TypeError: can't access property "filter", todos is undefined Poll error: TypeError: can't access property "filter", todos is undefined (repeated 30 times...)
After restart (08:24+):
[Client:poll] No output or progress yet {attempt: 1, progressFound: false}
[Client:poll] No output or progress yet {attempt: 2, progressFound: false}
(working correctly, no errors)Fix Summary (3 issues)
- currentRequestId undefined - Fixed in lines 1895, 1964
- Missing progress check in polling - Added
checkForProgress()call - TypeError on undefined todos - Added
Array.isArray(progress.todos)guard
What Was Happening
- User navigates away from Dashboard → SSE stream dies
- User navigates back →
page_visibletriggers recovery - Recovery calls
pollForOutput() - Polling calls
checkForProgress()which returns{found: true, todos: undefined} - CRASH:
progress.todos.filter()fails on undefined - Polling loop catches error, continues, but UI never updates
Next Steps
The fix is now deployed. You can test by:
- Send a prompt on Dashboard
- While Claude is working (todo updates visible), switch to Kontasks page
- Wait a few seconds, switch back to Dashboard
- Status bar should update and final kontask card should render
Quick Actions
Original Request
No layout configured
Details
Type
General
Status
Completed
Scope
vibetools
Tags
consolesserecovery
Created
2 Jan 2026, 6:29 pm
Updated
2 Jan 2026, 6:29 pm
Created By
claude
Raw Data
{
"id": "53365918-79a5-488a-bcf1-3ead46873c76",
"type": "general",
"status": "completed",
"title": "SSE Recovery Issue - Root Cause Found & Fixed",
"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;\">🔧 SSE Recovery Bug Investigation Complete</h2><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#61afef;margin:0 0 12px 0;\">Root Cause</h3><p style=\"color:#e0e0e0;margin:0;\">The <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">pollForOutput()</code> function was crashing with <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">TypeError: can't access property \"filter\", todos is undefined</code> because the fix from earlier wasn't deployed - <strong>konui needed to be restarted</strong>.</p></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#98c379;margin:0 0 12px 0;\">Evidence from Logs</h3><p style=\"color:#e0e0e0;margin:0 0 12px 0;\">Before restart (08:16-08:17):</p><pre style=\"background:#1e1e1e;padding:12px;border-radius:4px;overflow-x:auto;color:#e5c07b;\">Poll error: TypeError: can't access property \"filter\", todos is undefined\nPoll error: TypeError: can't access property \"filter\", todos is undefined\n(repeated 30 times...)</pre><p style=\"color:#e0e0e0;margin:12px 0 0 0;\">After restart (08:24+):</p><pre style=\"background:#1e1e1e;padding:12px;border-radius:4px;overflow-x:auto;color:#98c379;\">[Client:poll] No output or progress yet {attempt: 1, progressFound: false}\n[Client:poll] No output or progress yet {attempt: 2, progressFound: false}\n(working correctly, no errors)</pre></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#c678dd;margin:0 0 12px 0;\">Fix Summary (3 issues)</h3><ol style=\"color:#e0e0e0;margin:0;padding-left:20px;line-height:1.8;\"><li><strong>currentRequestId undefined</strong> - Fixed in lines 1895, 1964</li><li><strong>Missing progress check in polling</strong> - Added <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">checkForProgress()</code> call</li><li><strong>TypeError on undefined todos</strong> - Added <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">Array.isArray(progress.todos)</code> guard</li></ol></div><div style=\"background:#2d2d2d;padding:16px;border-radius:6px;margin-bottom:16px;\"><h3 style=\"color:#56b6c2;margin:0 0 12px 0;\">What Was Happening</h3><ol style=\"color:#e0e0e0;margin:0;padding-left:20px;line-height:1.8;\"><li>User navigates away from Dashboard → SSE stream dies</li><li>User navigates back → <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">page_visible</code> triggers recovery</li><li>Recovery calls <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">pollForOutput()</code></li><li>Polling calls <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">checkForProgress()</code> which returns <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">{found: true, todos: undefined}</code></li><li><strong>CRASH:</strong> <code style=\"background:#1e1e1e;padding:2px 6px;border-radius:3px;\">progress.todos.filter()</code> fails on undefined</li><li>Polling loop catches error, continues, but UI never updates</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=\"color:#9ca3af;margin:0;\">The fix is now deployed. You can test by:</p><ul style=\"color:#e0e0e0;margin:8px 0;padding-left:20px;\"><li>Send a prompt on Dashboard</li><li>While Claude is working (todo updates visible), switch to Kontasks page</li><li>Wait a few seconds, switch back to Dashboard</li><li>Status bar should update and final kontask card should render</li></ul></div></div>",
"requestId": "6d08103d-8a59-4bd9-8d78-2062fb3c19b6"
},
"createdBy": "claude",
"createdAt": "2026-01-02T08:29:28.448Z",
"updatedAt": "2026-01-02T08:29:28.620Z",
"requestId": "6d08103d-8a59-4bd9-8d78-2062fb3c19b6",
"scope": "vibetools",
"tags": [
"console",
"sse",
"recovery"
],
"targetUser": "claude"
}