Skip to content

About

Unofficial Windows Codex CLI daemon console-flash workaround; try --no-daemon first

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WINDOWLESS WORKAROUND FOR THE CODEX CLI DAEMON ON WINDOWS
=======================================================

Who needs this
--------------
If you use Codex only from a terminal, try `codex --no-daemon` first. It avoids
the shared background server and may stop the flashing without changing any
installed files. Normal CLI work still runs in that terminal session.

This workaround is for people who need to keep the managed app-server daemon,
for example to use a shared background server or remote clients, and see
visible Git or PowerShell console windows flash during Codex CLI activity.
It was tested with Codex app-server 0.157.0 on Windows 11. Other versions and
the dedicated Desktop Code Mode UI path have not been verified.

What it does
------------
Two small launchers are placed in front of the managed daemon's `codex.exe`
and `codex-code-mode-host.exe`. Each launcher starts the unchanged original
executable with Windows `CREATE_NO_WINDOW`, forwards arguments and standard
streams, waits for it, and returns its exit code. This changes how the original
process starts; it does not patch Codex's internal child-process call sites.

Install
-------
1. Extract the entire ZIP. Do not run the files inside the ZIP viewer.
2. Inspect the Rust sources and PowerShell script if you wish. The included
   launchers are locally compiled, unsigned executables. You can rebuild them
   yourself using docs/BUILD.md before installing.
3. Close active Codex CLI sessions and stop the managed daemon if it is running:
   `codex app-server daemon stop`
4. Double-click INSTALL-PATCH.cmd. It runs the local PowerShell script with
   ExecutionPolicy Bypass for that process only; it does not change the system
   execution policy.
5. Start Codex again and check whether the flashes have stopped.

Removal
-------
1. Close active Codex CLI sessions and stop the managed daemon.
2. Double-click REMOVE-PATCH.cmd.
3. Start Codex again.

Notes
-----
- No administrator rights are required for a normal per-user installation.
- The script touches the selected managed daemon package at:
  `%USERPROFILE%\.codex\packages\app-server-daemon\current\bin`
  (or the `-CodexRoot` value passed directly to the PowerShell script).
- The original executables remain beside the launchers as `codex.real.exe`
  and `codex-code-mode-host.real.exe` so the patch can be removed.
- An update can replace the managed package. Recheck the active version and
  rerun the installer only if the issue still occurs.
- This is an independent, temporary workaround, not an official Codex update.
  The upstream fix belongs in Codex's Windows process creation code.
- No managed Codex binaries, credentials, or authentication files are included.

Related reports
---------------
openai/codex#48422
openai/codex#18984

SHA-256 of the included launchers
--------------------------------
codex-daemon-shim.exe:
B5A3392C831871DA2807E6C5FADA3FEA7FE793D5DCBAB376AE7699BBC9FD2525
codex-code-mode-host-shim.exe:
D26216FB5D53BBEA92E4A158BA8D878D5C2D53A9FC62C9C98191088A2565F30D

After extraction, `Get-FileHash bin\codex-daemon-shim.exe` and
`Get-FileHash bin\codex-code-mode-host-shim.exe` can verify those values.

Package contents
----------------
INSTALL-PATCH.cmd              install the workaround
REMOVE-PATCH.cmd               restore the originals
script/codex-windowless.ps1    installer and removal logic
bin/                           compiled, unsigned launchers
src/                           Rust source code for the launchers
src/as-built/                  exact source of the included host launcher
docs/BUILD.md                  local build instructions
docs/TEST-RESULTS.md           reproduction record and limitations

About

Unofficial Windows Codex CLI daemon console-flash workaround; try --no-daemon first

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages