Skip to content

Keep unified exec output collection bounded - #32150

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c6e2efeb875ed8f35914365eab7431f25fd3484c
Jul 10, 2026
Merged

Keep unified exec output collection bounded#32150
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/c6e2efeb875ed8f35914365eab7431f25fd3484c

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 10, 2026

Copy link
Copy Markdown

Keep unified exec output collection bounded

Why

Unified exec can drain process output multiple times while waiting for a command. Collecting those drains into an uncapped buffer allows large commands to exceed the output collection limit.

What changed

  • Accumulate drained output through the capped head/tail buffer so collection remains bounded while preserving the beginning and end of the stream.
  • Include a ... N bytes omitted ... marker when the collection cap drops output.
  • Calculate the original token estimate from all observed bytes and preserve omission metadata through truncation and sandbox-denial responses.

Testing

  • Cover repeated drains, previously omitted output, omission markers, and large-output summaries.

## Why

Unified exec can drain process output multiple times while waiting for a command. Collecting those drains into an uncapped buffer allows large commands to exceed the output collection limit.

## What changed

- Accumulate drained output through the capped head/tail buffer so collection remains bounded while preserving the beginning and end of the stream.
- Include a `... N bytes omitted ...` marker when the collection cap drops output.
- Calculate the original token estimate from all observed bytes and preserve omission metadata through truncation and sandbox-denial responses.

## Testing

- Cover repeated drains, previously omitted output, omission markers, and large-output summaries.

GitOrigin-RevId: c6e2efeb875ed8f35914365eab7431f25fd3484c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/c6e2efeb875ed8f35914365eab7431f25fd3484c branch from 8339407 to 6138909 Compare July 10, 2026 12:23
@copyberry
copyberry Bot merged commit 6138909 into main Jul 10, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/c6e2efeb875ed8f35914365eab7431f25fd3484c branch July 10, 2026 12:24
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 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.