Repository navigation
Conversation
A TUI started while the server is electing or cold-booting after an update crashes with an unhandled transport defect: both the file.list probe and its location.get fallback fail and the ClientError escapes through Effect.tryPromise. Route the startup failure through the existing CLI error channel and format ClientError as a friendly "could not reach the OpenCode server" message with exit code 1.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Gentle bump on this one — TUI startup crash, open since the 9th, checks green, no review yet. If you'd prefer a different shape for the exit path, say the word and I'll rework it. |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Fixes #36688
Type of change
What does this PR do?
A TUI started while the background server is electing or cold-booting after an update can fail both startup location probes and crash with an unhandled
ClientErrorthroughEffect.tryPromise. Route the startup failure through the existing CLI error channel so the TUI exits with a friendly "could not reach the server" message and exit code 1 instead of a raw stack dump.How did you verify your code works?
bun typecheckinpackages/tuiandpackages/clibun testinpackages/tui(1176 passing) andpackages/cli(254 passing)test/error-message.test.tscovers the ClientError formatting and exit codeChecklist
Supersedes #46726 — the PR head fork was accidentally deleted on 2026-09-09 (not intentional, see the notification comment there); re-filing so the review can continue. Original conversation: #46726