Skip to content

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

Closed

Description

@siztankc

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.

  2. Enable the Git plugin.

  3. Work in a repository located at a Windows path, for example:
    D:\CodeAnvil

  4. Have Codex complete a Git operation such as staging, committing, and pushing.

  5. 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"}

  6. Open or return to that conversation.

  7. The conversation renderer crashes and shows:
    “앗, 오류가 발생했습니다”

What is the expected behavior?

No response

Additional information

No response

Activity

  1. added
    appIssues related to the Codex desktop app
    on May 16, 2026
  2. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    skillsIssues related to skills
    on May 16, 2026
  3. ermaxinc commented on May 16, 2026

    @ermaxinc

    same

    Image
  4. ermaxinc commented on May 16, 2026

    @ermaxinc

    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"}}
  5. etraut-openai commented on May 16, 2026

    @etraut-openai
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingskillsIssues related to skillswindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions