Repository navigation
fix(cli): start an OpenCode session's hooks with its id and prove several plugins answer one Stop - #1356
Closed
blafourcade wants to merge 2 commits into
Closed
fix(cli): start an OpenCode session's hooks with its id and prove several plugins answer one Stop#1356blafourcade wants to merge 2 commits into
blafourcade wants to merge 2 commits into
Conversation
…eral plugins answer one Stop SessionStart ran once at plugin load with no session id, and again each time the host recreated the plugin. It now runs on the first event naming a session, once, with the id and folder the event carries. The OpenCode profile declares session.created for it, as Kilo's does, and the orphaned server-init payloads are removed. A captured first event of a continued session drives its test. A test holds that two plugins answering the same Stop each reach the model. The Kilo bridge comment states the open run-mode loss as a limit with its versions. The V2 adapter's created event names no session, stated as a limit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s from the Kilo template The session-start call mapping lived once per host template. It is now one generated part both read, so only what differs per host stays in the host. The Kilo template states its run-mode limit with the probed versions and keys, and its provenance moves to the generator's doc comment. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 25, 2026
Contributor
Author
|
Superseded by #1378, which consolidates the five OpenCode and Kilo bridge branches into one shared runtime (V1 and V2) and is merged on |
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.
🎯 What & why
OpenCode's session hooks started with no session id, at plugin load, and again each time the host recreated the plugin. A Stop from two plugins on one turn was not shown to reach the model in run mode. This starts the hooks on a session's first event naming it, and proves that several plugins answering one Stop each reach the model.
Refs #1320
🛠️ How it works
info; a continued session names none.session.createdfor it, as Kilo's does. The orphaned server-init payloads are removed.hooks-host-map.md.🧪 How to verify
Goldens moved, all because the generated bridge text changed (comment, doc and V2 line): the five Kilo and five OpenCode
cli/tests/fixtures/hooks-routesfixtures,framework-build/golden.json,translate-install/golden.json.Gates on the final commit, all exit 0:
make validate; pre-commit (first run red, rerun green, the first failure was ascripts-testsrun that reportedchanged (content): commit-msgunder the shared.git/hooks, not root-caused); pre-push (9907 passed, 1 expected fail, 15 skipped); build, 879.8 KB of 897 KB budget (+0.6 KB).kilo rundoes not land a Stop follow-up fromsession.drainedon 7.8.27 (probed, negative). The host map's 3/3 measurement is not reproduced. The first expected Kilo behaviour is unmet and open on 7.7.5 and 7.8.27. HenceRefs, notCloses.🔗 Linked issue
Refs #1320
✅ I certify
🤖 Generated with Claude Code