Repository navigation
Preserve more tool metadata within outgoing message budgets - #47758
Merged
copyberry[bot] merged 1 commit intoSep 24, 2026
Conversation
## Why The 32 KiB per-result cap and 128 KiB aggregate budget discard tool metadata even when the outgoing request has room to retain it. ## What changed - Remove the per-result capture cap and raise the aggregate executed-tool metadata budget to 2 MiB. - Apply a 15 MiB soft budget to serialized HTTP requests and WebSocket messages, using the actual WebSocket delta. Trim optional result metadata on the wire copy while preserving ordinary content and logical history. - Prioritize `openai/resource_access` metadata during trimming, and include `overage_bytes` in omission markers. - Record bytes removed by metadata budgets in `codex.tool_metadata.shed_bytes`, tagged by stage. ## Testing Add coverage for HTTP and WebSocket message boundaries, resource preservation, residual marker removal, unchanged history, and shedding metrics. Update direct-tool and code-mode tests to verify metadata survives beyond the previous limits. GitOrigin-RevId: ed00996b77945300f60db1e52eff22b4de2707c1
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/ed00996b77945300f60db1e52eff22b4de2707c1
branch
from
September 24, 2026 05:48
a775a38 to
53446f9
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/ed00996b77945300f60db1e52eff22b4de2707c1
branch
September 24, 2026 05:49
asasasasasasasasasasasasasasasasasas
deployed
to
issue-triage
September 24, 2026 07:19 — with
GitHub Actions
Active
asasasasasasasasasasasasasasasasasas
deployed
to
issue-triage
September 24, 2026 07:19 — with
GitHub Actions
Active
asasasasasasasasasasasasasasasasasas
deployed
to
issue-triage
September 24, 2026 07:19 — with
GitHub Actions
Active
asasasasasasasasasasasasasasasasasas
deployed
to
issue-triage
September 24, 2026 07:20 — with
GitHub Actions
Active
This branch was successfully deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Preserve more tool metadata within outgoing message budgets
Why
The 32 KiB per-result cap and 128 KiB aggregate budget discard tool metadata even when the outgoing request has room to retain it.
What changed
openai/resource_accessmetadata during trimming, and includeoverage_bytesin omission markers.codex.tool_metadata.shed_bytes, tagged by stage.Testing
Add coverage for HTTP and WebSocket message boundaries, resource preservation, residual marker removal, unchanged history, and shedding metrics. Update direct-tool and code-mode tests to verify metadata survives beyond the previous limits.