Repository navigation
docs(inband): write down that Responses over a WebSocket is a no-op - #1394
Merged
Merged
Conversation
A client that sends Responses over a WebSocket bypasses the HTTP host. No inject, offload or expand runs on that path. This is safe because nothing lossy happens. The proxy answers the upgrade with 426, so Codex uses HTTPS through it. Refs #1388 Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Refs #1388 Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
amiddavid
commented
Nov 25, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddaid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 | offload-review skill, @amiddaid's session | fresh | 1 of 2 | 1 of 2 | 5a3cb6e963da |
blocking |
Verdict: blocking
Findings
- inband/doc.go:5 — the Codex citation path does not resolve; it is missing the
codex-rs/prefix- What fails: a reader follows
codex-api/src/endpoint/responses_websocket.rs, openai/codex f64f003and gets a 404. The file lives atcodex-rs/codex-api/src/endpoint/responses_websocket.rs. The second citation in the same doc (codex-rs/core/src/client.rs) keeps the prefix, so the two disagree on how the repo is laid out. - Proof:
https://github.com/openai/codex/blob/f64f003/codex-api/src/endpoint/responses_websocket.rsreturns 404. The GitHub code search forfilename:responses_websocket.rsin openai/codex returnscodex-rs/codex-api/src/endpoint/responses_websocket.rs, andgh api repos/openai/codex/contents/codex-rs/codex-api/src/endpoint/responses_websocket.rs?ref=f64f003returns the file. The file does send Responses over a WebSocket, so only the path is wrong. - Fix: write
codex-rs/codex-api/src/endpoint/responses_websocket.rs.
- What fails: a reader follows
Non-blocking
- The doc says OpenCode "keeps HTTP for the rest of the session". The source comment says "pins the Session to HTTP until restart or move" (
model-transport.ts, v2.4.1). A session move can end the pin earlier. The simplification is fair for this doc.
What I checked
- Read the full diff (both commits, 20e335e and 5a3cb6e) and the code around it:
inband/doc.go,inband/loop.go,inband/sse.go,proxy/proxy.go:584-609. - The package description matches
inband/loop.go:18-25: the host answers our own tools (expand, adjudicate, tool search) and the package keeps the decisions. - The 426 claim matches
proxy/proxy.go:602-609:GET /openai/v1/responseswith anUpgrade: websocketheader answershttp.StatusUpgradeRequired. It also matchesdocs/tool-search-matrix.md:103-104. - The "no-op is safe" reasoning holds: a marker needs an offload, and offload, inject and expand all run in the HTTP host, so a route with no HTTP host does nothing lossy. Fail open by construction.
- Verified the external citations against the upstream repos:
codex-rs/core/src/client.rsexists at openai/codex f64f003 and contains theUPGRADE_REQUIREDarms;packages/core/src/session/model-transport.tsexists at sst/opencode v2.4.1 and its comment says any connect failure "pins the Session to HTTP until restart or move" (finding 1 is the only citation that does not resolve). - The doc follows the repo's
doc.goconvention (lifecycle,reqfacts,respfacts,schemaall have one) and is the only package comment ininband—loop.goandsse.gocarry no package comment, so there is no duplicate. - Docs-only PR: no behavior change, no data-dependence change, no new binaries. Consistent with
docs/design.md:23.
amiddavid
commented
Nov 25, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 1 of 2 | 5a3cb6e963da |
blocking |
Verdict: blocking
Findings
- inband/doc.go:5 — the Codex citation path is wrong: the file is under
codex-rs/, not at the repo root- What fails: a reader who follows the citation
codex-api/src/endpoint/responses_websocket.rsin openai/codex at f64f003 gets a 404. At that commit the repo has no top-levelcodex-apidirectory; the file is atcodex-rs/codex-api/src/endpoint/responses_websocket.rs. The same doc citescodex-rs/core/src/client.rswith the correct prefix, so the missing prefix is an error, not a style choice. - Proof: GitHub API, repo openai/codex at ref f64f003:
contents/codex-api/src/endpointreturns 404;contents/codex-rs/codex-api/src/endpoint/responses_websocket.rsreturns the file. The root listing at f64f003 hascodex-cliandcodex-rs, nocodex-api. - Fix: add the prefix:
codex-rs/codex-api/src/endpoint/responses_websocket.rs. One word.
- What fails: a reader who follows the citation
Non-blocking
- The OpenCode citation names version "2.4.1". The git tag in sst/opencode is
v2.4.1. As a version number, not a ref, it reads fine. No change needed. - Issue #1388 point 1 also asks for the client-coverage page. PR #1400 (
docs/client-coverage-tools) covers that half. The split is fine, but the two PRs should merge together or #1400 first, so issue #1388 point 1 does not sit half-done on main. - The doc says OpenCode falls back "after any failed WebSocket connect". The cited file also falls back after repeated stream failures mid-session ("session websocket failed repeatedly; using http"). The doc's sentence is true as written; the stream-failure case is extra, not a contradiction.
What I checked
- Read the full diff: 2 commits, one new file
inband/doc.go(18 lines). Docs-only. No behavior change, no data-dependence change, no new binaries. inbandpackage sources (loop.go,sse.go): the package doc claim "nothing in this package runs" on a WebSocket path matches the architecture.inbandis called by HTTP hosts only.doc.gois the only package comment, so no duplicate-doc vet issue.- The 426 claim against this repo:
proxy/proxy.go:602-605answersGET /openai/v1/responseswith 426 whenUpgrade: websocketis present. Codex builds its WebSocket URL fromRESPONSES_PATH = "/responses"(codex-rs/codex-api/src/lib.rs:19), so the upgrade lands on that route. - The Codex fallback claim, in openai/codex at f64f003:
codex-rs/core/src/client.rshas twoStatusCode::UPGRADE_REQUIREDarms (lines 1940 and 2442); each callstry_switch_fallback_transportand returns, so the turn continues over HTTP at once. - The "full history over HTTP" claim, at f64f003: the HTTP path (
stream_responses_http→build_responses_request) builds the input from the whole prompt and never setsprevious_response_id; the incrementalprevious_response_idcontinuation exists only on the WebSocket path (prepare_websocket_request). This also matches our own note ininband/sse.go:846-848. - The OpenCode claim, in sst/opencode at v2.4.1,
packages/core/src/session/model-transport.ts: "Any connect failure, transient or not, pins the Session to HTTP until restart or move" — the connect-failure catch setshttpFallback = true, and every later exchange checks it first. Code search finds noprevious_response_idin sst/opencode, so OpenCode sends full history. - Issue #1388: this PR delivers point 1's package-doc half.
Refs #1388 Assisted-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Collaborator
Author
|
Both findings fixed in 1b2bedf (comments only):
|
amiddavid
commented
Nov 25, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddaid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 | offload-review skill, @amiddavid's session | resumed | 1 of 2 | 2 of 2 | 1b2bedf46318 |
approve |
Verdict: approve
Findings
None. Both round-1 findings are fixed.
Non-blocking
- Agree with reviewer 2, non-blocking note on PR #1400: this PR delivers the package-doc half of issue #1388 point 1. The client-coverage page is the other half. Merge the two together, or #1400 first, so the issue does not sit half-done on main.
What I checked
- Last review: round 1, 5a3cb6e, 2026-11-25T11:32:41Z.
- New commits read: 1 (1b2bedf, "docs(inband): fix the Codex path and the OpenCode fallback wording").
- Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files).
- New items since my last review, and what I did about each:
- Reviewer 2's round-1 review (11:36:21Z). Its finding is the same as my round-1 finding: the missing
codex-rs/prefix. Its non-blocking notes (version tag name, the #1400 split, the extra stream-failure fallback in OpenCode) need no change here. I checked each against the diff; none is contradicted by the fix commit. - The author's comment (11:37:52Z): "Both findings fixed in 1b2bedf". Verified below.
- Commit 1b2bedf. Read the full diff and the file around it. It changes two comment lines only:
- My round-1 finding, fixed. The citation now reads
codex-rs/codex-api/src/endpoint/responses_websocket.rs, which is the path I verified against openai/codex at f64f003 (gh api repos/openai/codex/contents/codex-rs/codex-api/src/endpoint/responses_websocket.rs?ref=f64f003returns the file). It now agrees with thecodex-rs/core/src/client.rscitation in the same doc. - My round-1 non-blocking note, fixed too. The OpenCode sentence now says "until restart or a session move", which matches the source comment in
model-transport.tsat sst/opencode v2.4.1 ("pins the Session to HTTP until restart or move").
- My round-1 finding, fixed. The citation now reads
- Reviewer 2's round-1 review (11:36:21Z). Its finding is the same as my round-1 finding: the missing
- The fix commit touches no code, so the round-1 verification stands: the 426 claim matches
proxy/proxy.go:602-609, the no-op is fail-open by construction, and the doc is the only package comment ininband. - Docs-only PR: no behavior change, no data-dependence change, no new binaries.
amiddavid
commented
Nov 25, 2026
amiddavid
left a comment
Collaborator
Author
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 | offload-review skill, @amiddavid's session | resumed | 2 of 2 | 2 of 2 | 1b2bedf46318 |
approve |
Verdict: approve
Findings
None.
Earlier findings
- inband/doc.go:5 — wrong Codex citation path (round 1, mine, same as reviewer 1's finding 1): fixed.
- The new head writes
codex-rs/codex-api/src/endpoint/responses_websocket.rs. I verified in round 1 that this path resolves at openai/codex f64f003. The two Codex citations in the doc now agree on the prefix.
- The new head writes
- OpenCode "keeps HTTP for the rest of the session" (reviewer 1's non-blocking): fixed too.
- The doc now says "until restart or a session move". This matches the source comment in
model-transport.tsat v2.4.1: "pins the Session to HTTP until restart or move". I checked this against the file in round 1.
- The doc now says "until restart or a session move". This matches the source comment in
Non-blocking
- None new. My round-1 non-blocking notes stand and need no change: the "2.4.1" version reads fine; the client-coverage half of issue #1388 point 1 is PR #1400, so merge the two together or #1400 first.
What I checked
- Last review: round 1, 5a3cb6e, 2026-11-25T11:36:21Z.
- New commits read: 1 (1b2bedf, "docs(inband): fix the Codex path and the OpenCode fallback wording"). The diff changes 2 lines in
inband/doc.goand nothing else. - Read in full: 2 reviews, 1 comment, 0 inline comments (from the three files). No output was cut.
- New items since my last review: commit 1b2bedf (read the full diff and the final
inband/doc.go), and the author's comment at 2026-11-25T11:37:52Z (read; it states both fixes, and both check out). - Older items read now for completeness: reviewer 1's round-1 review (posted 11:32:41Z, before my round 1). Its finding 1 is the same citation error as mine; I verified the fix myself rather than taking the author's word.
- The fix commit touches comments only. No behavior change, no data-dependence change, no new binaries.
doc.gostays the only package comment ininband.
amiddavid
added a commit
that referenced
this pull request
Nov 25, 2026
…eze) (#1405) docs(release): tell the PR owner after every merge Add a bullet to RELEASING.md section 3: after every merge, send the PR owner one message in the same step. Owner decision (David Amid, 2026-11-25): "put the rule into the realsing.md file so other integrators on other machines would know it". Refs #1394, #1388 docs(release): add Refs-only and full-freeze merge rules Add two bullets to RELEASING.md section 3, by owner decision ("add both"): write issue numbers in a PR body as "Refs #N" only, and freeze every merge for a PR stuck in a merge-of-main loop. Refs #1303, #1370, #1331 Docs only. The owner approved the text and the merge with no review round, in the integrator session, 2026-11-25: "1405 merge". Assisted-By: Claude Opus 5.5 Signed-off-by: DAVID AMID <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Writes down that Responses over a WebSocket is a known no-op for the in-band loop. Refs #1388 (point 1).
What changed
inband/doc.gowith the package doc and one paragraph on the WebSocket case.Behaviour
None. Comments only.
Data dependence
None. No code path changes.
How it was tested
macOS, Go 1.27.4:
go build ./inbandandgofmt -l inbandare clean.Technical notes
codex-api/src/endpoint/responses_websocket.rs, openai/codex f64f003).proxy/proxy.go,Handler.Mux), so Codex falls back to HTTPS.