Repository navigation
fix(opencode): settle RPCs when Rift exits, not when stderr closes - #46
Merged
Merged
Conversation
nexxeln
added this pull request to stack #48
October 5, 2026 07:05
Merged
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.
Follow-up to #43 | Stack: #46 ← #47
Why the change
A lifecycle hook that leaves a process running (
docker compose up,cmd &) kept the plugin's RPC call open until that process exited, sorift.createhung or timed out after Rift had already created the workspace.Special things to note
close, and a real-binarycreatestill takes about 20 ms.SIGPIPE. An abort after settling no longer kills them either.Rift was terminated by SIGKILLinstead ofRift exited with status null.Change outline
Hooks inherit Rift's stderr, so
close, which waits for every stdio stream, can wait on the hook's process instead of on Rift. Hooks can't hold stdout (hook.rspoints their stdout at stderr), so Rift exiting plus stdout ending is a reliable "done" signal. The short wait gives stderr written before the exit time to arrive in the failure message.Postcreate hook behavior against the real
riftbinary, before and after: