Skip to content

Document capi.enableWebSocketResponses as a resume option - #2578

Open
1fanwang wants to merge 1 commit into
github:mainfrom
1fanwang:1fannnw/document-websocket-resume-option
Open

Document capi.enableWebSocketResponses as a resume option#2578
1fanwang wants to merge 1 commit into
github:mainfrom
1fanwang:1fannnw/document-websocket-resume-option

Conversation

@1fanwang

@1fanwang 1fanwang commented Sep 8, 2026

Copy link
Copy Markdown

Why

Someone resumes a session and it starts returning 400 input item ID does not belong to this connection, or their proxy refuses WebSocket connections so resume never gets off the ground. Both are transport problems, and the SDK already lets them pick the transport on the resume call. They go to the session persistence guide, read the table of what can be reconfigured on resume, and the option is not there. Nothing in the docs suggests it exists, so the reasonable conclusion is that it does not and the session is lost.

The option is real. The resume config accepts it through the shared base config, every language binding exposes it, and it is covered by tests. Only the documentation was missing, and the table already lists its sibling capi.autoTier, which is what makes the omission read as deliberate.

After this change the reader finds the option in the same table they were already looking at, with a short section showing how to pass it.

What changed

One row in the resume options table, plus a section giving the default, the Python spelling, a resume example, and how it relates to the equivalent environment variable.

Testing Done

Documentation only, no code paths touched.

The option was absent from the docs before this change and present after:

$ git grep -c enableWebSocketResponses d5c9d06d -- docs/
(no output, exit status 1)

$ git grep -c enableWebSocketResponses HEAD -- docs/
HEAD:docs/features/session-persistence.md:3

The added example is also compiled by the existing docs validation, so a wrong option name or type would fail the build rather than render quietly.

Raw logs: docs validation (tail)
$ npm run validate:ts
TypeScript:
  ✅ 190 files passed

✅ All documentation code blocks are valid!

The resume options table listed capi.autoTier but omitted
capi.enableWebSocketResponses, which ResumeSessionConfig also accepts
through SessionConfigBase. Callers hitting WebSocket transport failures
on resume had no way to discover it from the docs.

Signed-off-by: 1fanwang <1fannnw@gmail.com>
@1fanwang
1fanwang requested a review from a team as a code owner September 8, 2026 18:28
Copilot AI balanced review requested due to automatic review settings September 8, 2026 18:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The documentation-only change is complete, validated, and has no unresolved issues.

Pull request overview

Documents WebSocket transport configuration when resuming persisted sessions.

Changes:

  • Adds capi.enableWebSocketResponses to the resume options table.
  • Documents defaults, Python syntax, usage, and environment-variable equivalence.
File summaries
File Description
docs/features/session-persistence.md Documents response transport selection for resumed sessions.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants