Repository navigation
Description
What version of Codex is running?
codex-cli 0.139.0
Which model were you using?
Not known / not relevant. The freeze occurred while pasting into the TUI composer, before submitting a prompt.
What platform is your computer?
- macOS 26.5.1 (25F80), Apple Silicon / arm64
- Warp 0.2026.06.03.09.49.02
- Terminal reported in Codex logs as
WarpTerminal/v0.2026.06.03.09.49.stable_02
What steps can reproduce the bug?
-
Run this command in Warp:
ls /dev/tty.usb* -
Select and copy plain terminal output similar to:
/dev/tty.usbserial-1130 /dev/tty.usbserial-11420 -
Focus the Codex TUI composer.
-
Press
Ctrl+V.
What is the expected behavior?
The copied plain text should be pasted, or Ctrl+V should be ignored without affecting TUI responsiveness.
What do you see instead?
The Codex TUI becomes permanently unresponsive. I had to open a new Codex session to continue working. The original Codex process remained alive after the freeze.
Additional diagnostic information
I inspected the local Codex logs and processes after the incident:
- No macOS Codex crash or hang report was generated.
- No panic, error, SQLite lock error, clipboard event, or paste event appeared around the incident time.
- The lack of a paste event may indicate that the freeze occurs early in TUI clipboard handling, before the event reaches normal logging.
- Multiple Codex instances were running against the same default
$CODEX_HOMEat the time. ~/.codex/logs_2.sqlitewas approximately 106 MB, its WAL was approximately 7.5 MB, and SQLite reportedbusy_timeout=0.- A process sample of the surviving Codex process showed TUI render/event-loop paths and multiple
sqlx-sqlite-workerthreads, but did not reveal a conclusive deadlock location.
There appear to be two plausible interacting causes:
Ctrl+Vuses Codex's special clipboard/image handling path on macOS, and Warp's clipboard payload for selected terminal text triggers a freeze.- Multi-instance SQLite contention stalls the TUI when clipboard handling triggers additional work.
Related issues:
- Image paste/drag-drop issues on macOS: inconsistent behavior with Cmd+V and Ctrl+V, multiple file paste/drag-drop, unclear UX, etc #3397: inconsistent
Cmd+V/Ctrl+Vclipboard behavior on macOS - Multi-terminal codex CLI freezes due to SQLite lock contention with no BUSY retry #20213: multi-terminal Codex freezes caused by SQLite lock contention
This report differs from #3397 because copying normal text and pressing Ctrl+V caused a permanent TUI freeze rather than doing nothing.
Activity
cmg1987 commentedon Jul 23, 2026
Cross-platform confirmation on Linux with stronger clipboard-path evidence.
Environment:
Reproduction:
Clipboard-state clarification: the user believed an image was present, but this was not independently verified at the time of the incident. The clipboard may have contained a valid image, an image representation unsupported by the TUI clipboard reader, or no readable image representation. The log error establishes only that Codex could not obtain the requested image format; it does not establish that the clipboard was empty.
Observed behavior:
failed to paste image: no image on clipboard: The clipboard contents were not available in the requested format or the clipboard is empty.Evidence from
~/.codex/logs_2.sqlite:codex_tui::clipboard_pastelogged 33 image-read attempts andcodex_tui::chatwidget::interactionlogged 32 failures.codex doctorreported the state and log database integrity checks as OK, so this does not appear to require SQLite contention.Expected behavior: whether the clipboard contains no readable image or an unsupported/unavailable image representation, report the failure once and immediately return control to the prompt. Buffered Ctrl+V or key-repeat events should not be replayed after a blocking clipboard read.
Codex diagnostic feedback and logs were uploaded under thread ID:
019f8e3f-f016-7d10-b110-e761a240b797.cmg1987 commentedon Sep 29, 2026
Follow-up to my Linux 0.145.0 reproduction: the same repeated Ctrl+V image-paste pattern recurred on Codex CLI 0.158.0, now with a successfully readable screenshot. This rules out an error-only retry path as the complete explanation.
Environment: Linux aarch64, UKUI Wayland, MATE Terminal 1.24.0 / VTE 0.60.3, external HDMI display 2560×1440. At inspection,
tui.alternate_screen = "never".The user copied a screenshot, briefly pressed Ctrl+V once in the TUI composer, and released it. The composer accumulated
[image1],[image2], ... continuously. Each image read took roughly 15–16 seconds; the UI became unusable and the user ultimately had to force a reboot. In contrast, using the terminal's right-click Paste on the screenshot produced exactly one[image1]and worked normally.Sanitized excerpts from
~/.codex/logs_2.sqliteon 2026-09-29, local time:Ten image attachments completed in about 2 minutes 22 seconds and an 11th read began before shutdown. A fresh read starts within a millisecond after each attachment. The logs do not include raw key events, so they cannot establish whether the extra
PasteImageactions originate in terminal key-event delivery, Codex event processing, or their interaction. The 0.158.0 key handler maps a Ctrl+VKeyEventKind::PresstoKeyEventAction::PasteImage.The July reproduction had 18-second reads followed by repeated failures; this one has 15–16-second reads followed by repeated successful attachments. Please investigate duplicate or replayed Ctrl+V actions after a blocking clipboard read, and consider coalescing paste actions while a read is in progress. There was no kernel OOM event in the incident window; the precise cause of the overall system stall remains unconfirmed.
etraut-openai commentedon Oct 12, 2026
(response from codex)
Closing as likely improved by #51411, included in CLI v0.162.1, which suppresses repeated image-paste key events instead of repeatedly doing clipboard work. If one Ctrl+V still freezes the TUI on a current version, please reopen with the terminal and clipboard formats so we can investigate the remaining case.