[PR #13175] fix(tui): prevent hanging on certain errors (#4506) #14545

Open
opened 2026-02-16 18:19:20 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13175

State: open
Merged: No


Summary

  • Fix Issue #4506: opencode run hangs when encountering certain errors instead of exiting
  • Enhanced error handling across TUI components to ensure immediate process exit
  • Added proper exit codes for different error scenarios

Changes

  • exit.tsx: Enhanced error handling with proper exit codes and corrected Object.assign usage
  • worker.ts: Fixed event stream error handling with immediate process exit and corrected indentation
  • run.ts: Improved CLI command error handling with guaranteed process exit

Impact

  • opencode now exits immediately on errors instead of hanging indefinitely
  • Proper exit codes distinguish between success (0) and errors (1)
  • More reliable behavior for automation and CI environments

Fixes #4506

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13175 **State:** open **Merged:** No --- ## Summary - Fix Issue #4506: opencode run hangs when encountering certain errors instead of exiting - Enhanced error handling across TUI components to ensure immediate process exit - Added proper exit codes for different error scenarios ## Changes - **exit.tsx**: Enhanced error handling with proper exit codes and corrected Object.assign usage - **worker.ts**: Fixed event stream error handling with immediate process exit and corrected indentation - **run.ts**: Improved CLI command error handling with guaranteed process exit ## Impact - opencode now exits immediately on errors instead of hanging indefinitely - Proper exit codes distinguish between success (0) and errors (1) - More reliable behavior for automation and CI environments Fixes #4506
yindo added the pull-request label 2026-02-16 18:19:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14545