Skip to content

Stop redundant message-board reads when limits reach one - #47064

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f00ddbcf0372c8f9318fa178259868caae55e68b
Sep 21, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Stop redundant message-board reads when limits reach one

Why

When result metadata exceeds the output budget, message-board tools keep retrying identical reads after all limits reach one.

What changed

Stop shrinking reads once every page and character limit reaches one, returning the existing metadata-budget error if the result still does not fit. Use the largest effective limit to keep retrying while either the page size or preview length can still shrink.

Testing

Add regression assertions for all five read tools with an impossible output budget, checking the error and exact read counts. Cover unequal page and preview limits and limits that are not powers of two.

## Why

When result metadata exceeds the output budget, message-board tools keep retrying identical reads after all limits reach one.

## What changed

Stop shrinking reads once every page and character limit reaches one, returning the existing metadata-budget error if the result still does not fit. Use the largest effective limit to keep retrying while either the page size or preview length can still shrink.

## Testing

Add regression assertions for all five read tools with an impossible output budget, checking the error and exact read counts. Cover unequal page and preview limits and limits that are not powers of two.

GitOrigin-RevId: f00ddbcf0372c8f9318fa178259868caae55e68b
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f00ddbcf0372c8f9318fa178259868caae55e68b branch from 3141f76 to 51d221a Compare September 21, 2026 16:17
@copyberry
copyberry Bot merged commit 51d221a into main Sep 21, 2026
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f00ddbcf0372c8f9318fa178259868caae55e68b branch September 21, 2026 16:17
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 21, 2026
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.

1 participant