Repository navigation
fix(opencode): report an interrupt during native verification instead of success - #969
Merged
Merged
Conversation
Canceling `agentplugins add` while OpenCode ran its native discovery queries (debug config, debug skill, mcp list) closed the query cleanly, and the closed failure was read as "could not verify". The install then finished as a prepared success with exit code 0 and no interruption notice. Return the command's cancellation after discovery, as the Cursor adapter does, so the CLI exits 1 with the resume hint. Failures of the query itself, including its own time budget, still leave the setup prepared.
777genius
marked this pull request as ready for review
November 17, 2026 02:08
|
Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here. So far, Strix has reviewed 392 pull requests, surfaced 113 security issues (1 critical/high) and blocked 3 risky merges across this workspace. |
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This was referenced Nov 17, 2026
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 #959, found by running the installer against a real OpenCode on Linux.
If
addfor OpenCode was interrupted (SIGINT or SIGTERM, to the whole process group or only to the CLI) while the client was checking the MCP server, the CLI exited with code 0 and"result":"success", statuscompleted, activationprepared, and no "interrupted" message. The state was consistent and a rerun reachedactive, but scripts and the user could not tell that the run was cut short. Cursor reports the same situation as an interrupt with exit 1.The cause is in the OpenCode skill observation: only "the process may still be running" was propagated. Any other error, including the cancelled command context closing a running query, was turned into a plain "could not verify", which leaves the setup
preparedand returns no error. The observation now returns the context error right after that check, as the Cursor adapter does. A failure of the query itself, including its own time budget, still leaves the setupprepared, so a client that cannot be verified without any cancellation behaves as before.Checked with a real OpenCode 1.19.4 and a stdio MCP server that delays its initialize answer: before the change SIGINT to the process group and to the CLI gave exit 0 and
success; after it both give exit 1, stagecanceledand "interrupted: run the same command again to resume", SIGTERM too. A rerun then reachesactive,doctorshows no open operation, there are no leftover processes, andremoveis clean. An MCP server that simply fails to start still gives exit 0 andprepared. The regression test covers the three query phases (debug config,debug skill,mcp list) and fails without the change.Not covered: a cancellation that arrives right after a successful check is still reported as interrupted although the install is already active (Cursor does the same, and a rerun is a no-op).