Skip to content

Suppress Windows console windows for background subprocesses - #49164

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

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Suppress Windows console windows for background subprocesses

Why

Background helpers launched from a detached Windows process can allocate console windows. Job Object launches and containment fallbacks need to preserve console suppression as well.

What changed

  • Add codex_utils_process::background_command to set CREATE_NO_WINDOW on Windows, and use it across background subprocess launches, including Git, plugins, authentication, diagnostics, and sandbox helpers.
  • Centralize console suppression in Job Object launches. Keep CREATE_NO_WINDOW when retrying without containment, and clear CREATE_SUSPENDED so the fallback child can run.
  • Preserve console inheritance for interactive shell launches and interactive AWS authentication refreshes.

Testing

Add Windows regression tests covering console-free launches from detached parents through standard and Tokio commands, stdout/stderr capture, successful containment, Job Object creation and assignment failures, and sandbox setup refresh helpers.

## Why

Background helpers launched from a detached Windows process can allocate console windows. Job Object launches and containment fallbacks need to preserve console suppression as well.

## What changed

- Add `codex_utils_process::background_command` to set `CREATE_NO_WINDOW` on Windows, and use it across background subprocess launches, including Git, plugins, authentication, diagnostics, and sandbox helpers.
- Centralize console suppression in Job Object launches. Keep `CREATE_NO_WINDOW` when retrying without containment, and clear `CREATE_SUSPENDED` so the fallback child can run.
- Preserve console inheritance for interactive shell launches and interactive AWS authentication refreshes.

## Testing

Add Windows regression tests covering console-free launches from detached parents through standard and Tokio commands, stdout/stderr capture, successful containment, Job Object creation and assignment failures, and sandbox setup refresh helpers.

GitOrigin-RevId: b2c238fa7d4f9fbd868e5adf7d4be9958ff01e6c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/b2c238fa7d4f9fbd868e5adf7d4be9958ff01e6c branch from 0e61e9e to fbc1698 Compare September 29, 2026 04:38
@copyberry
copyberry Bot merged commit fbc1698 into main Sep 29, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/b2c238fa7d4f9fbd868e5adf7d4be9958ff01e6c branch September 29, 2026 04:38
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2026
@beiwater
beiwater deployed to issue-triage September 29, 2026 04:43 — with GitHub Actions Active
@beiwater
beiwater deployed to issue-triage September 29, 2026 04:43 — with GitHub Actions Active
@beiwater
beiwater deployed to issue-triage September 29, 2026 04:43 — with GitHub Actions Active
@beiwater
beiwater deployed to issue-triage September 29, 2026 04:44 — with GitHub Actions Active
@Fireotics
Fireotics deployed to issue-triage September 29, 2026 04:45 — with GitHub Actions Active
@Fireotics
Fireotics deployed to issue-triage September 29, 2026 04:45 — with GitHub Actions Active
@Fireotics
Fireotics deployed to issue-triage September 29, 2026 04:45 — with GitHub Actions Active
@Nadr0j
Nadr0j deployed to issue-triage September 29, 2026 04:56 — with GitHub Actions Active
@Nadr0j
Nadr0j deployed to issue-triage September 29, 2026 04:56 — with GitHub Actions Active
@Nadr0j
Nadr0j deployed to issue-triage September 29, 2026 04:56 — with GitHub Actions Active
@Nadr0j
Nadr0j deployed to issue-triage September 29, 2026 04:57 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — fbc16982 Deployed Sep 29, 2026 by lpomjnuge-netizen via Translate non-English issue #15998
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