Skip to content

fix(environment): support 16 MiB control frames with explicit size errors - #656

Merged
jdchawla29 merged 5 commits into
mainfrom
codex/control-frame-error
Sep 10, 2026
Merged

jdchawla29 merged 5 commits into
mainfrom
codex/control-frame-error

Conversation

@jdchawla29

@jdchawla29 jdchawla29 commented Sep 9, 2026 •

Copy link
Copy Markdown
Collaborator

A roughly 72 KB task-start request exceeded asyncio's implicit 64 KiB line limit, causing the environment to close the connection and the rollout to report only EOFError. Control requests and responses now support 16 MiB of encoded JSON. Frame assembly preserves newline-delimited framing and normal socket backpressure, including when a connection becomes a raw capability tunnel.

Requests are validated before transmission so a local size error leaves the client usable for retry. Task-start replies rejected by size validation cancel the suspended task; transport failures leave it parked for session resume. Oversized inbound frames receive a bounded protocol error before disconnect, and oversized response errors retain the request ID when it fits or use a null ID when it does not. File-tracking transfers retain their separate limits.

Validation:

  • Environment, client, and rollout suites: 246 passed on Python 3.11 and 246 passed on Python 3.12. Reconnect regressions reproduce write failure and cancellation during the prompt response and verify the task remains resumable.
  • Covers 72 KB and 1 MiB round trips, the exact 16 MiB boundary, escaped Unicode, retries after rejection, setup teardown and reconnect, raw over-limit requests, oversized request IDs, and tunnel bytes/backpressure.
  • The existing cancellation timeout test synchronizes on agent startup before arming its short deadline and verifies the hung-cancel path is reached.
  • Ruff lint/format, type checks on the changed implementation and regression tests, and git diff --check passed.

Both the rollout driver and environment image must use the updated SDK to exchange frames above 64 KiB. Existing readers retain their old limit. No runtime deployment or SDK release is included.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-10T03:10:36.831674Z 4316b04 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 885385f5db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hud/environment/server.py Resolved
Comment thread hud/clients/client.py Resolved
Comment thread hud/environment/server.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13af81e775

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hud/environment/server.py Resolved
Comment thread hud/environment/server.py Resolved

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3879949. Configure here.

Comment thread hud/environment/utils.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c6eb657e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread hud/environment/server.py Resolved
@jdchawla29 jdchawla29 changed the title Raise control-channel frame limit to 16 MiB and report oversized frames fix(environment): support 16 MiB control frames with explicit size errors Sep 10, 2026
@jdchawla29
jdchawla29 force-pushed the codex/control-frame-error branch from af224d0 to 4316b04 Compare September 10, 2026 03:04
@jdchawla29
jdchawla29 merged commit ff39068 into main Sep 10, 2026
12 checks passed
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.

1 participant