Referenced chats (@-mention) injects entire prior conversation as a single message — permanent renderer freeze on every launch + unrecoverable compact deadlock
Open 💬 3 comments Opened Jul 14, 2026 by tingxueren
"Reference chats" (@-mention a chat) serializes the ENTIRE prior conversation into a single user message — permanent renderer freeze + unrecoverable context blowout
Environment
- ChatGPT Desktop for macOS, Codex Framework 150.0.7871.115
- macOS 15 (Apple Silicon)
- codex-cli 0.144.1 (used for recovery/verification)
Summary
Using the "@-mention a chat" (Referenced chats) feature with a large prior conversation injects the entire serialized transcript as ONE user message (885 KB in my case, beginning with ## Referenced chats with Codex: followed by the full JSON-serialized conversation). No size cap, no summarization. One oversized message then defeats every safety layer at once:
- Desktop UI permanently freezes. The renderer's JS main thread enters an infinite loop rendering the giant message (100% CPU, confirmed by
sample: all samples insidev8::Script::Run). Because the app auto-resumes the last session on every launch, killing the app, resetting the Chromium profile (~/Library/Application Support/Codex), and rebooting the machine all reproduce the freeze within 1–2 minutes of startup. There is no in-app way to escape. - Context window is unrecoverable. 885 KB ≈ 200k+ tokens in a single message. On resume, remote compaction deadlocks:
Error running remote compact task: Codex ran out of room in the model's context window— compaction works at message granularity and cannot split a single message that is larger than the window, so it can never free space.
Steps to reproduce
- Have a long-running chat (hundreds of turns).
- In a Codex Desktop session, use @-mention to reference that chat, send the message.
- The turn may complete once, but the session file now contains a single ~1 MB
response_item/user_message. - Quit and reopen the app → renderer spins at 100% CPU 1–2 min after launch, UI frozen. Reproduces on every launch (auto-resume).
codex resume <session-id>from CLI → remote compact fails withcontext_length_exceeded-style error; thread unusable.
Evidence
- Session rollout jsonl: line lengths 885,457 and 885,369 bytes (
response_item message+event_msg user_message), content starts with:
## Referenced chats with Codex:\nThis is untrusted background context from Codex chats.\n[{"title":"...","priorConversation":{"conversation":[...
sample <renderer-pid>: 100% of samples on the main thread inside V8 script execution (pure JS loop, no I/O wait).lsofon the app-server process shows the same rollout file reopened for write on every app launch (auto-resume), explaining why no restart helps.
Workaround (for other users hitting this)
- Quit the app; move the offending rollout file out of
~/.codex/sessions/YYYY/MM/DD/→ app starts normally. - To salvage the thread: truncate the oversized
text/messagefields in the two giant jsonl lines to a short placeholder, restore the file, thencodex resume <session-id>from the CLI.
Suggested fixes
- Cap / summarize referenced-chat content before injection (never emit a single message anywhere near the context window size).
- Renderer: virtualize/clip rendering of pathologically long messages.
- Compaction: handle single-message-larger-than-window (truncate or drop with notice) instead of deadlocking.
- Startup: detect a renderer that spins immediately after auto-resume and offer safe mode / skip-resume, so users are not permanently locked out.
Related issues
- #32342 (pasting a large ChatGPT conversation crashes the app — likely same rendering weakness, manual paste path)
- #25251 (large thread → sustained 100%+ CPU)
- #24089 (resume-time remote compact fails with context_length_exceeded)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗