Codex GUI exits immediately on Windows when user profile path contains Korean characters

Open 💬 4 comments Opened Jun 13, 2026 by web0908
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the Codex App are you using (From “About Codex” dialog)?

v0.140.0-alpha.2

What subscription do you have?

ChatGPT Plus

What platform is your computer?

_No response_

What issue are you seeing?

Environment

  • OS: Windows 11
  • Codex Version: v0.140.0-alpha.2
  • Installation: Microsoft Store
  • User Profile Path: C:\Users\김혜진

Issue

Codex CLI works normally, but Codex GUI exits immediately after launch.

The process appears briefly in Task Manager and then disappears.

No visible error message is shown.

What I tested

  • Reinstalled Codex
  • Reset / Repair from Windows Apps settings
  • Removed ~/.codex
  • Removed %LOCALAPPDATA%\OpenAI\Codex
  • Removed runtime cache
  • Reinstalled multiple times

None of the above resolved the issue.

Important Finding

I created a new Windows account with an English-only profile path:

C:\Users\codextest

On the same machine:

  • Codex GUI works correctly under the English account
  • Codex GUI immediately exits under the Korean account

CLI works correctly in both accounts.

Runtime Behavior

Under the Korean profile, Codex repeatedly creates staging directories:

%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node

Examples:

.staging-789504f803e82e2b-12Mxqj
.staging-789504f803e82e2b-88KOd3
.staging-789504f803e82e2b-rshvii

No final runtime directory is ever created.

Log Observation

Sandbox logs show corrupted user path encoding.

Expected:

C:\Users\김혜진\.codex\...

Observed:

C:\Users\源?쒖쭊\.codex\...

This suggests a Unicode/path encoding issue during runtime setup.

Expected Behavior

Codex GUI should launch normally regardless of whether the Windows user profile path contains non-ASCII characters.

Actual Behavior

GUI exits immediately while CLI continues to function correctly.

What steps can reproduce the bug?

  1. Create or use a Windows 11 account whose profile path contains Korean characters.

Example:
C:\Users\김혜진

  1. Install Codex from Microsoft Store.
  1. Launch Codex from the Start Menu.
  1. Observe that Codex briefly appears in Task Manager and then exits immediately.
  1. Open PowerShell and run Codex CLI directly:

& "C:\Users\김혜진\AppData\Local\OpenAI\Codex\bin\<version>\Codex.exe"

  1. Observe that the CLI works correctly.
  1. Create a new Windows account with an ASCII-only profile path.

Example:
C:\Users\codextest

  1. Install and launch Codex under the new account.
  1. Observe that the GUI launches successfully.

Additional observation:

  • Under the Korean profile, Codex repeatedly creates:

%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\.staging-*

  • No final runtime directory is created.
  • Sandbox logs show corrupted path encoding for the user profile directory.

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #28061
  • #28017
  • #27822
  • #27506
  • #27409

Powered by Codex Action

young2857 · 2 months ago

It seems that any non-english user name would cause this bug , the bug appears in my PC(a Chinese username )by continueing generating .stage folders.

wonhy2ok · 2 months ago

I can reproduce this issue.

Environment:

  • Windows 11
  • User profile path: C:\Users\정원혁
  • Codex v0.140.0

Observed:

  • codex.exe (CLI) works normally.
  • codex app prints:

Opening Codex Desktop workspace C:\Users\정원혁...

  • Desktop process appears briefly and exits immediately.
  • No Windows Event Viewer errors.
  • Windows Defender shows no detections.

Runtime state:
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node

Only empty .staging-* directories are created.
No final runtime directory is generated.

I removed the runtimes directory and retried multiple times. The issue persists.

yrjynw · 2 months ago

Additional repro from a Chinese Windows username on zh-CN / CP936. This looks like the same non-ASCII user-profile path issue, but the mojibake variant is especially clear here.

Bug report: Codex for Windows creates mojibake user-profile paths for a Chinese username and repeatedly stages runtime files

Summary

Codex for Windows appears to mishandle a non-ASCII Windows user profile path. On this machine, the real Windows user profile is:

C:\Users\以日记以年忘

Codex also created and/or wrote to a mojibake variant of that path:

C:\Users\浠ユ棩璁颁互骞村繕

The mojibake string is exactly what results when the UTF-8 bytes of 以日记以年忘 are decoded as GBK/CP936. This strongly suggests a UTF-8 vs GBK path encoding bug on Windows.

Impact

  • Codex becomes noticeably slower.
  • The mojibake user directory accumulates Codex runtime staging directories.
  • The bad runtime cache path contains 15 .staging-* directories totaling about 4 GB.
  • The correct runtime cache path contains stable runtime version directories and no staging directories.

Environment

Codex app package: OpenAI.Codex_26.616.6631.0_x64__2p2nqsd0c76g0
Codex app version: 26.616.6631.0
Windows edition: Windows 10 Pro for Workstations
Windows version: 2009
OS HAL: 10.0.26100.1
Architecture: 64-bit
OS language: zh-CN
OS locale: zh-CN
Windows ANSI/OEM code page: 936 / 936
PowerShell default encoding: gb2312

Evidence

Correct Codex runtime cache:

Path        : C:\Users\以日记以年忘\AppData\Local\OpenAI\Codex\runtimes\cua_node
Entries     : 3
StagingDirs : 0
TotalMB     : 285.09
LastWrite   : 2026-06-21 16:11:27

Mojibake Codex runtime cache:

Path        : C:\Users\浠ユ棩璁颁互骞村繕\AppData\Local\OpenAI\Codex\runtimes\cua_node
Entries     : 15
StagingDirs : 15
TotalMB     : 4085.01
LastWrite   : 2026-06-21 02:23:37

The bad directory contains repeated runtime staging folders such as:

.staging-a89897d3d9baa117-eycZJL
.staging-a89897d3d9baa117-4W0woY
.staging-a89897d3d9baa117-UZk8fo
.staging-a89897d3d9baa117-WB6DqG
...

Encoding confirmation:

orig = "以日记以年忘"
garbled = orig.encode("utf-8").decode("gbk")
print(garbled)
# 浠ユ棩璁颁互骞村繕

Expected behavior

Codex should consistently use the real Windows user profile path:

C:\Users\以日记以年忘

It should not create or write to a mojibake path derived from incorrectly decoding the username.

Actual behavior

Codex writes to both:

C:\Users\以日记以年忘\AppData\Local\OpenAI\Codex
C:\Users\浠ユ棩璁颁互骞村繕\AppData\Local\OpenAI\Codex

The mojibake path contains repeated incomplete runtime staging directories, which appear to cause wasted disk usage and likely startup/runtime slowdown.

Possible cause

Some Windows path handling code appears to treat UTF-8 bytes as GBK/CP936 text, or otherwise round-trip the user profile path through a non-Unicode code page. This may happen in the runtime downloader/extractor/cache initialization path for cua_node.

Workaround attempted / suggested

  • Use an ASCII-only workspace path such as C:\Codex or D:\Codex.
  • Avoid relying on %USERPROFILE% paths containing non-ASCII characters.
  • Clean only the failed Codex .staging-* directories under the mojibake path after fully quitting Codex.

Please check the Windows app runtime cache/downloader path handling for non-ASCII user profile names, especially on zh-CN systems using code page 936.