Additional evidence from the shipped Windows desktop bundle:
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
Additional evidence from the shipped Windows desktop bundle:
Environment:
- Windows package:
OpenAI.Codex_26.825.3734.0 - Electron package:
openai-codex-electron 26.825.31414 - Renderer chunk inside
app.asar:
webview/assets/app-initial-C0QxlT9Z.js - No source maps were included.
Observed behavior in the minified renderer implementation:
- In rich-text mode,
getPersistedText()returns the result of
markdownEditor.serialize(...)without normalization. getText()uses the same serializer, but converts back to a
plain space only with an end-anchored replacement and only when the
final document node ends in a space.- Consequently,
 immediately before a newline is not normalized.
Persisted composer text does not receive this normalization at all.
I also confirmed that the literal   is written into the local session
JSONL immediately before an LF character. It can be observed in queued
messages and in already-sent messages when they are copied or edited.
Repeated restoration adding backslashes before underscores is consistent
with already serialized Markdown being passed through serialization again.
This part is an inference from the behavior: the exact restore path could not
be identified because the renderer is minified and has no source maps.
This is more than a visual rendering problem. The corrupted text can reach
the model input and subsequently appear in generated tool calls or
PowerShell scripts, altering filenames and filesystem paths.
Suggested regression coverage:
- Compose text containing
sara_storage_config. - Include multiline text, trailing spaces, and a space immediately before LF.
- Include a path such as
D:\Work\sample\_project. - Persist and restore the composer several times.
- Assert that the restored text is byte-for-byte identical after every cycle.
- Send the restored draft and assert that the app-server input text is also
byte-for-byte identical to the original.
Originally posted by @TrinkieYinkie in https://github.com/openai/codex/issues/39844#issuecomment-5456334321
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with webview/assets/app-initial-C0QxlT9Z.js inside app.asar and trace the composer serialization and restore behavior; the payload notes that the bundle is minified and has no source maps. Add regression coverage for multiline text, trailing spaces, underscores, and the D:\Work\sample_project path, verifying byte-for-byte persistence, repeated restoration, and app-server input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100