@openai/codex-sdk opens a visible codex.exe console window on Windows
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- nodejs, typescript
Research direction
Start at the TypeScript SDK entry point that launches this.executablePath with child_process.spawn, using the exec --experimental-json path described in the issue. Check the SDK's Windows process-launch behavior and verify on Windows that a background task no longer opens a console window while JSON execution still works.
Written by the indexing model from the issue text.
Description
What is the problem?
When using @openai/codex-sdk from a GUI/background app on Windows, starting a Codex task opens a visible black console window. The window title is the bundled native Codex binary path, for example:
E:\git\github\..\node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\codex\codex.exe
This appears to be the TypeScript SDK's direct codex.exe child process, not the separate PowerShell helper window tracked in other Windows issues.
Why this matters
@openai/codex-sdk is useful from Electron apps, editor integrations, background workers, and daemons. In those hosts, SDK calls should be able to run non-interactively without flashing or leaving a visible terminal window on the user's desktop.
Environment
- OS: Windows 10
- Host: Node/Electron background worker
- Observed with:
@openai/codex-sdk@0.129.0 - Latest checked:
@openai/codex-sdk@0.132.0 - Native binary package:
@openai/codex-win32-x64
Evidence
The latest published @openai/codex-sdk@0.132.0 still spawns the native binary without windowsHide:
const child = spawn(this.executablePath, commandArgs, {
env,
signal: args.signal
});
The command is the SDK's JSON exec path, so it is already non-interactive/stdin-stdout based. On Windows, Node will create a visible console window for a console subsystem executable unless the parent passes windowsHide: true.
Expected behavior
When the TypeScript SDK launches Codex in its non-interactive JSON exec mode on Windows, it should not create a visible console window.
Actual behavior
A visible black console window titled with the bundled codex.exe path appears while the task is running.
Suggested fix
Set windowsHide: true on the SDK's child_process.spawn call that launches this.executablePath, or expose a SDK option that allows hosts to pass it through. Since this SDK path uses exec --experimental-json with piped stdio, hiding the console seems like the expected default on Windows.
Related but distinct issues
- #18984 tracks PowerShell parser child windows spawned by native
codex.exe. - #20510 tracks long-lived PowerShell helper windows spawned by
codex.exeeven when the parent launches Codex hidden.
This issue is one level earlier: the TypeScript SDK currently launches codex.exe itself without windowsHide.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100