bug[cli] :: gh comment body may post literal \n sequences

Open 💬 2 comments Opened Mar 6, 2026 by bniladridas
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

Summary

When Codex posts GitHub issue comments via shell/gh, escaped newline sequences can be sent literally (e.g., \\n) instead of rendered as actual line breaks.

Expected

  • Multiline comment text renders with real new lines.

Actual

  • Comment contains literal \\n text.

Repro (high level)

  1. Use Codex to post an issue comment via shell command with escaped newlines in a quoted body.
  2. Observe rendered comment contains backslash-n sequences.

Evidence

Suggested fix

  • In Codex command generation, avoid escaped newline literals for GH comment bodies; prefer HEREDOC-style body composition or explicit multiline payload handling.

View original on GitHub ↗

2 Comments

etraut-openai contributor · 5 months ago

If you can repro this, please use /feedback to upload your session details, then post the thread ID here.

This might be model behavior, not something we can fix in the codex harness.

bniladridas · 5 months ago

Thank you over your seeing but I assume if we reckon that again surely share session details.