TUI client CPU 100% when server shuts down #4638

Open
opened 2026-02-16 17:44:52 -05:00 by yindo · 1 comment
Owner

Originally created by @SunandRiver on GitHub (Jan 10, 2026).

Originally assigned to: @rekram1-node on GitHub.

Problem: TUI client goes into tight retry loop causing CPU 100% when server is killed.

Repro:

  1. Run opencode spawn
  2. Kill server process
  3. Attach client spins CPU at 100%

Expected: Client should back off and exit gracefully.

This is being fixed in PR #7468.

Originally created by @SunandRiver on GitHub (Jan 10, 2026). Originally assigned to: @rekram1-node on GitHub. Problem: TUI client goes into tight retry loop causing CPU 100% when server is killed. Repro: 1. Run opencode spawn 2. Kill server process 3. Attach client spins CPU at 100% Expected: Client should back off and exit gracefully. This is being fixed in PR #7468.
yindo added the perf label 2026-02-16 17:44:52 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 10, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #5094: OpenCode TUI loses connection with server - TUI stops responding when server connection is lost, possibly related to retry/reconnection loop behavior
  • #3841: server.close() is unawaitable - makes graceful shutdown/restart difficult - Directly related to server shutdown handling and graceful shutdown issues
  • #6983: Opencode with OpenAI stuck in loop with errors - Mentions being stuck in a loop with errors, may involve similar retry loop mechanism

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 10, 2026): This issue might be a duplicate of existing issues. Please check: - #5094: OpenCode TUI loses connection with server - TUI stops responding when server connection is lost, possibly related to retry/reconnection loop behavior - #3841: `server.close()` is unawaitable - makes graceful shutdown/restart difficult - Directly related to server shutdown handling and graceful shutdown issues - #6983: Opencode with OpenAI stuck in loop with errors - Mentions being stuck in a loop with errors, may involve similar retry loop mechanism Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4638