Repository navigation
fix(opencode): keep detached services from invalidating the foreground terminal - #25378
Merged
Merged
Conversation
…ncode-detached-service-foreground
…ncode-detached-service-foreground
…ncode-detached-service-foreground
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.
ELI5
OpenCode can start a background service while its terminal remains active. On macOS, Orca mistook the service's missing terminal for a different terminal and refused to identify the foreground OpenCode process.
What Changed
Reuse Orca's existing check for a real controlling terminal in the host foreground-process resolver. Detached services no longer invalidate the foreground TUI. Unknown foreground terminals, genuinely different terminals, multiplexers, and missing process identities still return
unverifiable.Why
macOS reports a detached service's terminal as
??. Sharing the existing predicate keeps process-group cleanup and foreground evidence consistent without guessing from a process name or introducing another process parser. The wire format and freshness checks stay unchanged.Linked Issue
Related to #22829 and the inherited-hook investigation in #13385. This PR does not close either broader report.
Visual Proof
N/A — this changes the host process check and adds no renderer changes. Installed OpenCode process captures and their results are described below.
Testing
ttys096, while the detached service reported??; two host observations refused withtty_boundarybefore input.livewhile the detached service still reports??. The app quit normally, all 46 recorded process IDs were absent, and four TCP listeners plus both private Unix sockets were checked closed.The live run stopped before prompts: an additional test guard compared differently spaced process timestamps. That guard failure is retained; the run does not demonstrate model completion or inherited-hook behavior. The host foreground check itself passed all nine observations.
Linux sentinel cases and mixed remote-evidence admission are covered by tests. No Windows or SSH runtime claim. All four changed paths were independently reviewed, and the normal join preserves every other path from Main.
Review
Independent source and captured-evidence review completed. The genuine rebuilt-app host observations and cleanup were checked separately; the additional test guard failure is disclosed above.
Agent skill upstream boundary
Checklist