Skip to content

Response envelopes omit Cursor and Location from PrintMembers (V27) #30

Open

Description

@Blind-Striker

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.

Activity

  1. Blind-Striker commented on Aug 17, 2026

    @Blind-Striker
    CollaboratorAuthor

    The same PrintMembers mechanism also drops the resolved location sibling.

    EnvelopeEmitter emits Location, but its custom PrintMembers override appends only the payload. Calling ToString() on a successful selected Shell location envelope therefore omits the server-resolved location, just as this issue's existing cursor finding omits the cursor.

    Broaden the fix so PrintMembers appends every envelope-owned diagnostic member in deterministic order: payload, cursor when present, and location when present. Keep the error path safe by reading backing fields instead of guarded public getters.

    Trigger: execute with this issue's existing cursor fix; current selected Shell operations already expose the location omission.

  2. Blind-Striker commented on Sep 14, 2026

    @Blind-Striker
    CollaboratorAuthor

    Status 2026-09-14: still true on 0.8.0-preview.2 — the guarded PrintMembers override on cursor-list envelopes (for example SessionListResponse) prints the payload but not Cursor, so logging a successful page loses the continuation token. Small generator fix in the envelope emitter plus a snapshot re-approval; tracked on the project board.

  3. changed the title [-]M2: cursor-list diagnostics omit the page cursor in PrintMembers (V27)[/-] [+]Response envelopes omit Cursor and Location from PrintMembers (V27)[/+] on Sep 27, 2026
  4. added this to the 1.0 milestone on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentSpecified enough that the work is mechanical

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions