Skip to content

fix(tui): prevent hanging on certain errors (#4506)#13175

Closed
HRronaldo wants to merge 3 commits into
anomalyco:devfrom
HRronaldo:fix/run-hangs-on-errors
Closed

fix(tui): prevent hanging on certain errors (#4506)#13175
HRronaldo wants to merge 3 commits into
anomalyco:devfrom
HRronaldo:fix/run-hangs-on-errors

Conversation

@HRronaldo

Copy link
Copy Markdown

Summary

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

Ensure opencode exits properly when encountering errors
instead of hanging indefinitely

Fixes anomalyco#4506

- Enhanced error handling in exit.tsx with proper exit codes
- Fixed event stream error handling in worker.ts with immediate process exit
- Improved CLI command error handling in run.ts with guaranteed process exit
@github-actions

Copy link
Copy Markdown
Contributor

Hey! Your PR title Fix/run hangs on errors doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@HRronaldo HRronaldo changed the title Fix/run hangs on errors fix(tui): prevent hanging on certain errors (#4506) Feb 11, 2026
Ensure opencode exits properly when encountering errors
instead of hanging indefinitely

Fixes anomalyco#4506

- Enhanced error handling in exit.tsx with proper exit codes
- Fixed event stream error handling in worker.ts with immediate process exit
- Improved CLI command error handling in run.ts with guaranteed process exit
@HRronaldo
HRronaldo force-pushed the fix/run-hangs-on-errors branch from c73eecb to 1f8fde0 Compare February 11, 2026 16:45
- Add environment check for OPENCODE_E2E_SESSION_TITLE to prevent test interference
- Fixes GitHub Actions failures while preserving error handling functionality
- Maintains Issue anomalyco#4506 fix in production environments
@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

@github-actions github-actions Bot closed this Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: opencode run hangs when encountering certain errors instead of exiting

1 participant