Skip to content

Bound local exec-server output draining after process exit - #52652

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/d38bcd394be42cf48d2af02733e883b02d1dd62f
Oct 9, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Bound local exec-server output draining after process exit

Why

A local command can exit while a descendant keeps its inherited output pipes open, delaying exec_command completion and turn completion.

What changed

Start the bounded output drain when a local exec-server process exits, whether exit is reported by an event or recovered through process/read. Remote execution continues waiting for output closure so buffered or delayed output is retained.

Testing

Add regression coverage for local shell snapshot execution completing before a descendant releases stdout, preserving the foreground output and exit code. Add remote event-stream cases that retain output arriving after both reported and recovered process exit.

## Why

A local command can exit while a descendant keeps its inherited output pipes open, delaying `exec_command` completion and turn completion.

## What changed

Start the bounded output drain when a local exec-server process exits, whether exit is reported by an event or recovered through `process/read`. Remote execution continues waiting for output closure so buffered or delayed output is retained.

## Testing

Add regression coverage for local shell snapshot execution completing before a descendant releases stdout, preserving the foreground output and exit code. Add remote event-stream cases that retain output arriving after both reported and recovered process exit.

GitOrigin-RevId: d38bcd394be42cf48d2af02733e883b02d1dd62f
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/d38bcd394be42cf48d2af02733e883b02d1dd62f branch from 9e2ff42 to 89c8759 Compare October 9, 2026 17:32
@copyberry
copyberry Bot merged commit 89c8759 into main Oct 9, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-09T17:32:40.797166Z 9e2ff42 PR opened
ℹ️ 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.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/d38bcd394be42cf48d2af02733e883b02d1dd62f branch October 9, 2026 17:32
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026
@Aikey079
Aikey079 deployed to issue-triage October 9, 2026 17:39 — with Image GitHub Actions Active
@Aikey079
Aikey079 deployed to issue-triage October 9, 2026 17:39 — with Image GitHub Actions Active
@Aikey079
Aikey079 deployed to issue-triage October 9, 2026 17:39 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
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.

7 participants