Codex desktop fails to render reopened thread containing assistant-emitted git directive blocks
What version of the Codex App are you using (From “About Codex” dialog)?
Codex desktop 26.513.31313
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Windows 10.0.19045 x64
What issue are you seeing?
Codex desktop fails to render a reopened conversation when an assistant message contains git directive-like text such as ::git-stage{...} or ::git-commit{...}.
This is not limited to standalone directive lines. I reproduced it when the assistant included the directive-like text inside normal explanatory text and inline code spans.
The same conversation can still be opened/read outside the desktop renderer, but the Codex desktop app fails to render it after reopening from the sidebar.
The failure appears to happen when the desktop renderer re-parses assistant-emitted directive-like text and then crashes while parsing the cwd="P:\Codex\001_demo" payload.
What steps can reproduce the bug?
- Start or open a Codex desktop thread.
- Have the assistant produce a message containing git directive-like text with a Windows
cwd, for example:
::git-stage{cwd="P:\Codex\001_demo"}
or:
::git-commit{cwd="P:\Codex\001_demo"}
- The directive-like text does not need to be standalone. I also reproduced the issue when the assistant included it inside normal explanatory text, including inline code spans.
- Close the thread.
- Reopen the same thread from the sidebar.
Actual result:
The thread fails to render and shows an error page.
This does not appear to require actually executing git stage or git commit. The trigger appears to be the assistant message content containing directive-like text.
What is the expected behavior?
The reopened thread should render normally.
Assistant-emitted text that looks like git directive blocks should be treated as display content when rendering conversation history, or safely escaped/ignored by the renderer. It should not cause the entire thread to fail to render.
Additional information
Relevant logged error:
[electron-message-handler] error boundary
name=LocalConversationPage
errorMessage="invalid syntax at line 1 col 5:
1 cwd=\"P:\\Codex\\001_demo\"
^"
Relevant stack locations:
at Br (app://-/assets/markdown-D32gobzN.js:8:5425)
...
at Object.postMessage (app://-/assets/vscode-api-BEuchX0L.js:1:57272)
at Object.error (app://-/assets/vscode-api-BEuchX0L.js:1:57033)
at app://-/assets/review-file-source-tab-BmlwHNat.js:9:123182
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
This looks likely related to / possibly a duplicate of #22968.
One extra reproduction detail from my case: the directive-like text does not need to appear as standalone lines. I reproduced the desktop render failure when the assistant merely mentioned the strings inside a normal explanatory message, including inline code spans:
Just came here to lodge this :P (as created by codex).
I had to get claude to write some code to fix it ...now that is sad.
Additional confirmation from another Windows 10 install.
Environment:
OpenAI.Codex_26.513.3673.0_x64app/resources/app.asarI can confirm the issue is not only caused by an assistant accidentally writing directive-like text. The installed Codex app bundle itself appears to contain hard-coded developer instruction text telling the assistant to emit live git app directives after stage/commit/branch/push/PR actions.
Evidence from local inspection:
app.asarcontains 6 references to the live git directive prefix.turn_context.developer_instructions.Observed renderer failure:
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:
%USERPROFILE%\.codex\sessionsand%USERPROFILE%\.codex\archived_sessions.bak-pathfix-<timestamp>backups before editingcwd,cwds, orfileD:\foo\bartoD:/foo/bar_Run from PowerShell:_
We've issued a hotfix to address this. Please update to the latest version.