External Publication
Visit Post

Code block copy button drops first character of last line

OpenAI Developer Community June 19, 2026
Source

When clicking the copy button on a multi-line code block, the first character of the last line is sometimes omitted from the clipboard contents.

Example

Displayed in code block:

git status
git branch --show-current
git log --oneline --decorate -5
gh pr list --head codex/issue-139-auto-fix

Expected clipboard contents:

git status
git branch --show-current
git log --oneline --decorate -5
gh pr list --head codex/issue-139-auto-fix

Actual clipboard contents:

git status
git branch --show-current
git log --oneline --decorate -5
h pr list --head codex/issue-139-auto-fix

Environment
Browser: Firefox 151.0
OS: macOS 10.15+ (Intel Mac in your screenshot)
ChatGPT Web
Reproduced multiple times
Additional Notes
The issue appears to affect the last line only.
The rendered code block displays correctly.
Only the clipboard contents are incorrect.
Manually selecting and copying the text does not exhibit the issue.

Discussion in the ATmosphere

Loading comments...