fix(client): surface background service startup errors - #41802
Open
opencode-agent[bot] wants to merge 1 commit into
Open
fix(client): surface background service startup errors#41802opencode-agent[bot] wants to merge 1 commit into
opencode-agent[bot] wants to merge 1 commit into
Conversation
opencode-agent
Bot
force-pushed
the
service-errors
branch
from
August 11, 2026 17:14
fffb86e to
a44316f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
When the Desktop beta background service cannot bind its configured port, the child CLI knows the actionable
Managed service port ... is already in useerror. The client currently discards that result. Overlapping contenders can then mask their nonzero exits until the two-minute ensure deadline, leaving Desktop to show onlyTimed out waiting for the background service to start.The child may also write unrelated startup diagnostics to stderr, so forwarding stderr wholesale is not an acceptable error contract. This change uses an explicit marker emitted only for the controlled service error and returns only that marked message.
Testing
bun typecheckinpackages/clientbun test test/service.test.ts test/promise-service.test.ts --timeout 25000inpackages/client(21 pass)GOMAXPROCS=2 bun typecheckinpackages/cliRequested by: @neriousy (Filip via Slack)