Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

fix(cli): bound the wait for the standalone server's ready line - #68570

Open
ilvy23 wants to merge 1 commit into
anomalyco:devfrom
ilvy23:standalone-ready-timeout
Open

ilvy23 wants to merge 1 commit into
anomalyco:devfrom
ilvy23:standalone-ready-timeout

Conversation

@ilvy23

@ilvy23 ilvy23 commented Dec 5, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #68569

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Standalone.start waited for the child server's ready line with no time limit, so a child that stalls before printing it leaves opencode run --standalone hanging forever with no output. This bounds the wait (2 minutes by default, generous because a first start runs all DB migrations) and fails with an error that points to OPENCODE_PRINT_LOGS=1. The child is still cleaned up by the existing scope. No feature flag: it only changes behaviour when the server never becomes ready.

This does not explain why the child stalled in my case; it makes the failure visible instead of silent.

How did you verify your code works?

  • New test packages/cli/test/standalone-ready.test.ts uses a child that never prints: it times out without the fix and passes with it (fails after ~0.3s, no leftover process).
  • bun test in packages/cli: 491 pass, 0 fail
  • bun run typecheck:tsc, oxlint and prettier on the changed files: clean

Screenshots / recordings

N/A (no UI change)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

This branch has not been deployed

No deployments
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.

cli: opencode run --standalone hangs forever if the server never prints its ready line

1 participant