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
TUI hangs indefinitely when resuming sessions with large file diffs (formatPatch/structuredPatch blocks event loop) #23362
When resuming certain sessions that contain many file modifications and resending a message, the TUI freezes completely (no response to ESC or any input). The hang is deterministic and reproducible.
Root Cause
The hang is caused by formatPatch(structuredPatch(..., { context: Number.MAX_SAFE_INTEGER })) from the diff npm package, called synchronously inside Snapshot.diffFull().
Call chain
prompt.ts — SessionSummary.summarize() is called fire-and-forget at step 1 of the processor
Closing as duplicate of #22650 — same root cause (formatPatch(structuredPatch(..., { context: Number.MAX_SAFE_INTEGER })) in snapshot/index.ts). Adding our findings as a comment on #22650.
Reopening: although this is likely a duplicate of #22650 (same root cause in snapshot/index.ts), we cannot fully confirm equivalence since #22650 covers the web/desktop path while this issue was identified and verified on the TUI path only. Keeping this open as the target for #23366.
Activity
github-actions commentedon Apr 19, 2026
This issue might be a duplicate of an existing issue. Please check:
formatPatch(structuredPatch(..., { context: Number.MAX_SAFE_INTEGER }))blocking the main thread causing UI lag/freeze in the diff pipeline. That issue also coversSessionSummaryandsnapshot/index.tsas bottlenecks.sim590 commentedon Apr 19, 2026
Closing as duplicate of #22650 — same root cause (
formatPatch(structuredPatch(..., { context: Number.MAX_SAFE_INTEGER }))insnapshot/index.ts). Adding our findings as a comment on #22650.sim590 commentedon Apr 19, 2026
Reopening: although this is likely a duplicate of #22650 (same root cause in
snapshot/index.ts), we cannot fully confirm equivalence since #22650 covers the web/desktop path while this issue was identified and verified on the TUI path only. Keeping this open as the target for #23366.github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
sim590 commentedon Aug 22, 2026
@rekram1-node: this issue still occurs. It has not been addressed.
It is impossible to interrupt the LLM. It is stuck and pressing ESC only toggles the bottom message and the process never gets interrupted:
#23366 fixes this. Please consider looking at the PR.