Document capi.enableWebSocketResponses as a resume option - #2578
SteveSandersonMS merged 1 commit into
Conversation
There was a problem hiding this comment.
🟢 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.enableWebSocketResponsesto 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.
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>
c06e6b0 to
723f213
Compare
SteveSandersonMS
left a comment
There was a problem hiding this comment.
Verified: capi.enableWebSocketResponses is a real, tested field on ResumeSessionConfig across all 6 SDKs (Node, .NET, Python, Go, Rust, Java), shipped in #1711 but missing from this table alongside its sibling capi.autoTier. Re-ran npm run validate:ts in scripts/docs-validation myself and confirmed the new snippet compiles (190/190 passed). Rebased onto current main to clear the merge-state block.
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:
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)