Skip to content

Track WebSocket continuation modes and full-input send reasons - #46051

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/29324f5e9d5677e0c6068f89b2256a92a5a0d157
Sep 16, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/29324f5e9d5677e0c6068f89b2256a92a5a0d157

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Track WebSocket continuation modes and full-input send reasons

Why

Per-socket metrics label resends after reconnect as initial requests, obscuring why full input was sent. Client telemetry can preserve that reason across reconnect failures and turn boundaries.

What changed

  • Add codex.websocket.continuation to count response.create send attempts, including failed sends, with mode, reason, and phase tags.
  • Distinguish incremental continuations, fresh requests, restored history, closed connections, and other full-input sends. Track warmup and generation separately.
  • Preserve the first continuation reset reason until the next send and identify resumed or forked history.
  • Allow session telemetry to use a MetricsClient supplied through thread extensions and document the counter's semantics.

Testing

Add metric assertions for incremental reuse, warmup, changed requests, account switches, reconnects, and resumed or forked history. Add a unit test for preserving reset reasons across repeated resets and turn boundaries.

## Why

Per-socket metrics label resends after reconnect as initial requests, obscuring why full input was sent. Client telemetry can preserve that reason across reconnect failures and turn boundaries.

## What changed

- Add `codex.websocket.continuation` to count `response.create` send attempts, including failed sends, with `mode`, `reason`, and `phase` tags.
- Distinguish incremental continuations, fresh requests, restored history, closed connections, and other full-input sends. Track warmup and generation separately.
- Preserve the first continuation reset reason until the next send and identify resumed or forked history.
- Allow session telemetry to use a `MetricsClient` supplied through thread extensions and document the counter's semantics.

## Testing

Add metric assertions for incremental reuse, warmup, changed requests, account switches, reconnects, and resumed or forked history. Add a unit test for preserving reset reasons across repeated resets and turn boundaries.

GitOrigin-RevId: 29324f5e9d5677e0c6068f89b2256a92a5a0d157
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/29324f5e9d5677e0c6068f89b2256a92a5a0d157 branch from 346a65b to c56dda7 Compare September 16, 2026 22:44
@copyberry
copyberry Bot merged commit c56dda7 into main Sep 16, 2026
1 check failed
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/29324f5e9d5677e0c6068f89b2256a92a5a0d157 branch September 16, 2026 22:44
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 16, 2026
@J-dev2
J-dev2 deployed to issue-triage September 16, 2026 22:57 — with GitHub Actions Active
@J-dev2
J-dev2 deployed to issue-triage September 16, 2026 22:57 — with GitHub Actions Active
@J-dev2
J-dev2 deployed to issue-triage September 16, 2026 22:57 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — c56dda71 Deployed Sep 16, 2026 by ynakazat11 via Translate non-English issue #13641
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants