Skip to content

docs: what SessionInfo.Model means, and WaitForSessionAsync for waiting on a turn #969

Open

Description

@Blind-Striker

Two gaps in the consumer documentation that a first-time integrator hits.

  1. SessionInfo.Model is empty when the model comes from the agent. At the pin, opencode writes a session's model only when it is set explicitly: at create (SessionCreateRequest.Model, via SessionCreated) or through a model switch (ModelSelected). A model resolved from the agent's configuration is recorded on each assistant message instead. The XML summary of SessionInfo.Model and the requests guide should say what the field means, when it is null, and where to read the model that actually ran.
  2. client.Experimental.WaitForSessionAsync is hard to find. Callers who need "wait until this turn has finished" end up writing their own race between the event stream and the session's outcome. The streaming guide's section on waiting for a turn to end should lead with it: what it waits for (the session's agent loop becoming idle), that a pending permission ask keeps the session busy (so the caller still answers asks from the event stream), and that the caller owns the deadline.

Done when both are documented in the XML documentation and the guides, with a short example for the second.

Activity

  1. added this to the Next milestone on Nov 20, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions