You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
server.close() is unawaitable - this makes graceful shutdown/restart more difficult #3841
Ideally server.close() returns a promise that resolves once the port is resumed.
The starter code when running via tsx --watch <script> or node --watch <script> (basically anything that restarts quickly) will attempt to create an opencode server before the opencode server created by the previous invocation has fully shut down.
It appears that promises aren't needed in the SIGTERM case (node will wait for all resources to close), but it would still be useful in the case where we want to orchestrate multiple / restart instances of opencode.
Activity
matthewoates commentedon Nov 3, 2025
More on this -
It appears that promises aren't needed in the SIGTERM case (node will wait for all resources to close), but it would still be useful in the case where we want to orchestrate multiple / restart instances of opencode.
Br1an67 commentedon Mar 1, 2026
I'd like to work on this. The fix makes
close()return a Promise that resolves when the child process has exited, enabling proper graceful shutdown.PR: #15597
github-actions commentedon May 1, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.