openai / openai/codex

Pasted terminal output is Markdown-escaped before reaching the Codex model

Open
#44,979 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug
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?
  1. Copy terminal output from cat containing a shell script.
  2. Paste it as plaintext into a Codex task.
  3. Send the message.
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.