Pasted terminal output is Markdown-escaped before reaching the Codex model
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using (From “About Codex” dialog)?
26.903.71938 (build 8576)
What subscription do you have?
Plus
What platform is your computer?
macOS, Apple Silicon
What issue are you seeing?
Examples seen by the model:
#!/bin/sh became \#!/bin/sh
$LOG_DIR became $LOG\_DIR
--delete-after became \--delete-after
.log became \.log
user@host became user\@host
Independent checks on the source file confirmed none of those backslashes
actually existed.
What steps can reproduce the bug?
- Copy terminal output from
catcontaining a shell script. - Paste it as plaintext into a Codex task.
- Send the message.
- Codex interprets inserted escape characters as literal script contents.
What is the expected behavior?
Expected:
Terminal/code text should reach the model byte-for-byte, or the model should
receive metadata indicating that backslashes were introduced solely for
Markdown presentation.
Actual:
The model treated presentation-layer escaping as file content and incorrectly
reported that the valid script was malformed.
Impact:
This can cause false code reviews and potentially harmful recommendations to
modify valid shell scripts.
Additional information
No response
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
Reproduce the issue by pasting the listed shell examples into a Codex task, then trace the path from terminal paste through Markdown handling to the model message. Done means shell text reaches the model without presentation-only backslashes, or the message clearly distinguishes those escapes from file content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- markdown, shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100