SSE client parses an obsolete/invented event shape; questions are never answered (H-03 + M-02)
Surfaced by the gpt-5.6-sol final review, verified locally against the OpenCode 1.17.15 OpenAPI document.
The real contract (confirmed from /doc):
message.updated carries message metadata in properties.info (no parts).
- Parts arrive via
message.part.updated → properties.part (plus message.part.delta).
session.created/session.updated carry session metadata in properties.info.
question.asked / question.v2.asked events exist with /question/{requestID}/reply and /reject endpoints.
applyOpenCodeEvent() (opencode.mjs) only handles message.updated and looks for message.parts/properties.parts arrays; it never handles message.part.updated, never reads properties.info.id/sessionID/parentID (so turnId can become the evt_… envelope id and child sessions are missed), and has no question branch — a plan-agent question waits out the full 30-minute turn timeout. The fake fixture (tests/fake-opencode-fixture.mjs) emits an invented flat shape ({type:"message.updated", sessionID, message:{id, parts}}), so tests reinforce the bug.
Fix:
- Implement
message.part.updated (accumulate/replace parts by part id, respect deltas); treat message.updated as metadata via properties.info.
- Register child sessions from
properties.info; take message ids from properties.info.id.
- Reject questions immediately with a useful message (deterministic headless policy) instead of stalling.
- Regenerate fixture event shapes from a version-pinned
/doc schema; add contract tests.
Source: gpt-5.6-sol final review H-03 and M-02 (opencode-plugin-cc-analysis.md).
SSE client parses an obsolete/invented event shape; questions are never answered (H-03 + M-02)
Surfaced by the gpt-5.6-sol final review, verified locally against the OpenCode 1.17.15 OpenAPI document.
The real contract (confirmed from
/doc):message.updatedcarries message metadata inproperties.info(no parts).message.part.updated→properties.part(plusmessage.part.delta).session.created/session.updatedcarry session metadata inproperties.info.question.asked/question.v2.askedevents exist with/question/{requestID}/replyand/rejectendpoints.applyOpenCodeEvent()(opencode.mjs) only handlesmessage.updatedand looks formessage.parts/properties.partsarrays; it never handlesmessage.part.updated, never readsproperties.info.id/sessionID/parentID(soturnIdcan become theevt_…envelope id and child sessions are missed), and has no question branch — a plan-agent question waits out the full 30-minute turn timeout. The fake fixture (tests/fake-opencode-fixture.mjs) emits an invented flat shape ({type:"message.updated", sessionID, message:{id, parts}}), so tests reinforce the bug.Fix:
message.part.updated(accumulate/replace parts by part id, respect deltas); treatmessage.updatedas metadata viaproperties.info.properties.info; take message ids fromproperties.info.id./docschema; add contract tests.Source: gpt-5.6-sol final review H-03 and M-02 (
opencode-plugin-cc-analysis.md).