Source: multi-agent review of PR #26, adversarial verification (CONFIRMED, severity 1, shipped-runtime diagnostics). 2026-08-14. Scope widened by the 2026-08-17 comment below.
The generated guarded PrintMembers override on response envelopes prints the shared metadata and the payload, but not the other envelope-owned members:
- Cursor on cursor-list envelopes. Logging a successful page loses the continuation token that identifies it. Example:
src/OpenCode.Sdk/Sessions/SessionListResponse.cs prints Sessions but not _cursor.
- Location on envelopes with a server-resolved location. Example:
src/OpenCode.Sdk/Agents/AgentListResponse.cs.
Status 2026-09-27: still true at v2.0.18. Two cursor envelopes and 41 Location envelopes are affected.
Fix: in EnvelopeEmitter, make PrintMembers append every envelope-owned diagnostic member in a fixed order: payload, cursor when present, location when present. Read backing fields, not guarded public getters, so the error path stays safe. Regenerate, re-approve snapshots, and pin it with a contract assertion on ToString() output.
Trigger: the next change that touches the envelope emitters.
Source: multi-agent review of PR #26, adversarial verification (CONFIRMED, severity 1, shipped-runtime diagnostics). 2026-08-14. Scope widened by the 2026-08-17 comment below.
The generated guarded
PrintMembersoverride on response envelopes prints the shared metadata and the payload, but not the other envelope-owned members:src/OpenCode.Sdk/Sessions/SessionListResponse.csprintsSessionsbut not_cursor.src/OpenCode.Sdk/Agents/AgentListResponse.cs.Status 2026-09-27: still true at
v2.0.18. Two cursor envelopes and 41 Location envelopes are affected.Fix: in
EnvelopeEmitter, makePrintMembersappend every envelope-owned diagnostic member in a fixed order: payload, cursor when present, location when present. Read backing fields, not guarded public getters, so the error path stays safe. Regenerate, re-approve snapshots, and pin it with a contract assertion onToString()output.Trigger: the next change that touches the envelope emitters.