You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A failed thread carries no failure reason; sidebar badge is an unexplained Failed #140
ThreadStatus is a bare string union "idle" | "working" | "done" | "failed" (src/shared/ipc.ts:48). The sidebar badge (src/components/Sidebar.tsx:290-295) renders "Failed" with no tooltip or reason; the only place the cause lives is an event card inside the thread transcript.
Impact
After a night of parallel runs, triaging several red threads means opening each one and scrolling to find the event card. "Provider CLI crashed" vs "budget cap hit" vs "permission denied" are very different follow-ups and the UI cannot distinguish them at a glance. Retry itself exists (src/retryTurn.ts); the gap is surfacing the reason.
Fix direction
Store a short lastError on the thread when a run fails, show it as the badge tooltip and in the Agents panel row.
Dispatched two grok workers on non-overlapping file sets:
backend (99f1b9d5): src/shared/ipc.ts field, electron/store.js (clear lastError on any non-failed status change + normalize + boot sweep), electron/runner.js (~12 status: "failed" sites already have errText in scope), electron/orchServer.js (thread_status prefers stored value, keeps the message-scan fallback for old threads), electron/test/.
Storing rather than deriving: the sidebar reads threads:summaries, which deliberately does not walk transcripts. electron/orchServer.js:296-307 already derives the same reason by scanning messages — that becomes the back-compat fallback.
Done. Both halves merged onto coder/use-grok-workers-to-do-this-gh-issue-you-08ef20.
Backend (5239954)
shortError() in electron/runner.js — first 2 lines, 300-char cap — applied at all 14status: "failed" sites, each of which already had the reason in scope as errText/errLabel/failText.
electron/store.js: migrateThread defaults lastError to null; the boot sweep of stranded working threads stamps "Run error: app quit while the run was in flight"; and updateThread clears lastError on any non-failed status change — so a retry cannot carry a stale reason, and no call site has to remember to clear it.
electron/orchServer.js: thread_status prefers the stored value, keeps the message scan as fallback for threads that failed before this landed.
Frontend (69ec45d)
Sidebar.tsx: title={thread.lastError ?? undefined} on the Failed badge — native tooltip, no component, no dependency.
AgentsPanel.tsx: recap facts line appends the whitespace-collapsed reason; full text is the row title.
Verification — tsc --noEmit clean; npm test = 38/38 core, 720/720 renderer, 814/815 electron. The single electron failure (wireClient × webBridge → production first backoff is still 1s, 120000 !== 1000) is pre-existing: it reproduces identically on the base commit 1e9f3c2 in a clean worktree, and touches none of the 11 files changed here.
Activity
currentbits commentedon Aug 17, 2026
Dispatched two grok workers on non-overlapping file sets:
99f1b9d5):src/shared/ipc.tsfield,electron/store.js(clearlastErroron any non-failed status change + normalize + boot sweep),electron/runner.js(~12status: "failed"sites already haveerrTextin scope),electron/orchServer.js(thread_statusprefers stored value, keeps the message-scan fallback for old threads),electron/test/.f85aface):src/components/Sidebar.tsxbadgetitle,src/components/AgentsPanel.tsxfacts row,test/.Storing rather than deriving: the sidebar reads
threads:summaries, which deliberately does not walk transcripts.electron/orchServer.js:296-307already derives the same reason by scanning messages — that becomes the back-compat fallback.currentbits commentedon Aug 17, 2026
Done. Both halves merged onto
coder/use-grok-workers-to-do-this-gh-issue-you-08ef20.Backend (
5239954)shortError()inelectron/runner.js— first 2 lines, 300-char cap — applied at all 14status: "failed"sites, each of which already had the reason in scope aserrText/errLabel/failText.electron/store.js:migrateThreaddefaultslastErrortonull; the boot sweep of strandedworkingthreads stamps"Run error: app quit while the run was in flight"; andupdateThreadclearslastErroron any non-failed status change — so a retry cannot carry a stale reason, and no call site has to remember to clear it.electron/orchServer.js:thread_statusprefers the stored value, keeps the message scan as fallback for threads that failed before this landed.Frontend (
69ec45d)Sidebar.tsx:title={thread.lastError ?? undefined}on the Failed badge — native tooltip, no component, no dependency.AgentsPanel.tsx: recap facts line appends the whitespace-collapsed reason; full text is the rowtitle.Verification —
tsc --noEmitclean;npm test= 38/38 core, 720/720 renderer, 814/815 electron. The single electron failure (wireClient × webBridge→production first backoff is still 1s,120000 !== 1000) is pre-existing: it reproduces identically on the base commit1e9f3c2in a clean worktree, and touches none of the 11 files changed here.Not pushed, no PR — branch is local.