Codex Desktop crashes conversation renderer when Git directive contains Windows cwd path

Resolved 💬 4 comments Opened May 16, 2026 by siztankc Closed May 16, 2026
💡 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)?

Codex App version: 26.513.3673.0

What subscription do you have?

Subscription: Pro

What platform is your computer?

Platform: Windows

What issue are you seeing?

After updating Codex Desktop, conversations can crash with “앗, 오류가 발생했습니다” when a Git directive contains a Windows-style cwd path.

The issue appears when the final assistant message includes directives like:

::git-stage{cwd="D:\CodeAnvil"}
::git-commit{cwd="D:\CodeAnvil"}
::git-push{cwd="D:\CodeAnvil" branch="main"}

The conversation view then fails to render. The app log shows:

invalid syntax at line 1 col 5:

1 cwd="D:\CodeAnvil"
^

If I archive the affected conversation, other conversations become visible again. Disabling the Git plugin also appears to avoid the issue.

What steps can reproduce the bug?

  1. Use Codex Desktop on Windows.
  1. Enable the Git plugin.
  1. Work in a repository located at a Windows path, for example:

D:\CodeAnvil

  1. Have Codex complete a Git operation such as staging, committing, and pushing.
  1. Let the final assistant response include Git directives with a Windows-style cwd path, for example:

::git-stage{cwd="D:\CodeAnvil"}
::git-commit{cwd="D:\CodeAnvil"}
::git-push{cwd="D:\CodeAnvil" branch="main"}

  1. Open or return to that conversation.
  1. The conversation renderer crashes and shows:

“앗, 오류가 발생했습니다”

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 3 months ago

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

  • #23004
  • #22977
  • #22968
  • #22985
  • #22963

Powered by Codex Action

ermaxinc · 3 months ago

same

<img width="954" height="475" alt="Image" src="https://github.com/user-attachments/assets/57640527-7f11-4bc5-abcc-affda2dab6e7" />

ermaxinc · 3 months ago

Temporary workaround for Windows users until Codex ships a fix.

The issue seems to be caused by Codex Desktop re-parsing old local JSONL session messages that contain directive-like blocks with Windows paths, for example cwd="D:\project\repo". The thread data is still there, but the Desktop renderer crashes while rendering the history.

This PowerShell one-liner does a narrow local repair:

  • scans %USERPROFILE%\.codex\sessions and %USERPROFILE%\.codex\archived_sessions
  • only touches JSONL session files
  • creates .bak-pathfix-<timestamp> backups before editing
  • only normalizes Windows path separators inside directive attributes named cwd, cwds, or file
  • converts D:\foo\bar to D:/foo/bar
  • does not delete, truncate, or rewrite the conversation content otherwise

_Run from PowerShell:_

taskkill /F /IM Codex.exe 2>$null; $ts=Get-Date -Format 'yyyyMMdd-HHmmss'; $roots=@("$env:USERPROFILE\.codex\sessions","$env:USERPROFILE\.codex\archived_sessions")|?{Test-Path $_}; $rx='(?<a>\b(?:cwd|cwds|file)=\\?"?)(?<v>(?:[A-Za-z]:|\\\\)[^"\\]*(?:\\+[^"\\]*)*)(?<q>\\?")'; Get-ChildItem $roots -Recurse -File -Filter '*.jsonl' -ErrorAction SilentlyContinue | % {$p=$_.FullName; $s=[IO.File]::ReadAllText($p); $n=([regex]::Matches($s,$rx)).Count; if($n -gt 0){Copy-Item $p "$p.bak-pathfix-$ts"; $s=[regex]::Replace($s,$rx,{param($m) $m.Groups['a'].Value + ($m.Groups['v'].Value -replace '\\+','/') + $m.Groups['q'].Value}); [IO.File]::WriteAllText($p,$s,[Text.UTF8Encoding]::new($false)); "fixed=$n file=$p"}}
etraut-openai contributor · 3 months ago

We've issued a hotfix to address this. Please update to the latest version.