Codex Desktop becomes slow or stuck after context compaction and approval transcript injection
Environment
- Product: Codex Desktop app
- OS: macOS
- Comparison baseline: Codex CLI/TUI
- Local session logs inspected: user-local
~/.codex/sessionslogs
Summary
Codex Desktop feels noticeably slower than Codex CLI/TUI during reasoning, and several sessions appeared stuck enough that I had to interrupt or start a new session.
The issue seems correlated with long-running Desktop sessions, context_compacted events, and injected approval-review transcript blocks such as approval assessment / TRANSCRIPT DELTA.
Observed Behavior
- Reasoning in Codex Desktop is noticeably slower than CLI/TUI for similar workflows.
- Some Desktop sessions become stuck or unresponsive and need interruption.
- The slowdown often appears after long conversation history,
context_compacted, approval review transcript injection, or large tool call / tool output histories.
Local Log Evidence
I scanned local ~/.codex/sessions logs.
High-level counts:
Total session files: 156
Total turns: 1695
Total turn_aborted events: 85
Total context_compacted: 70
Codex Desktop:
files: 69
turns: 72
turn_aborted: 4
turns >= 8 minutes: 3
Codex CLI/TUI:
files: 117
turns: 1547
turn_aborted: 78
turns >= 8 minutes: 52
Although CLI/TUI has more total aborts, it also has far more turns. Desktop has a relatively high number of slow/interrupted turns in a much smaller sample, which matches the user-facing perception that Desktop is less responsive.
Representative Examples
Example 1: Desktop turn after context compaction took about 23 minutes
Observed details from one local session log:
originator: Codex Desktop
turn start line: 610
turn end line: 748
duration: about 23 minutes
events: context_compacted, then task_complete
tool calls: about 36
tool outputs: about 30
Example 2: Approval transcript injection appears repeatedly in Desktop sessions
Observed details from another local Desktop session log:
originator: Codex Desktop
pattern: repeated approval assessment / TRANSCRIPT DELTA messages
These injected blocks include prior tool call arguments, tool outputs, retry reasons, and planned actions. They appear to increase context size and may be contributing to slower Desktop reasoning or UI responsiveness.
Example 3: Desktop session interrupted shortly after starting
Observed details from another local Desktop session log:
originator: Codex Desktop
event: turn_aborted
reason: interrupted
From the user side, this corresponds to a session that appeared stuck and had to be interrupted.
Expected Behavior
- Codex Desktop should not become significantly slower than CLI/TUI after long context, compaction, or approval-review injection.
- Approval transcript /
TRANSCRIPT DELTAdata should not cause unbounded context growth or repeated heavy reprocessing. - The UI should clearly distinguish model reasoning, tool execution, waiting for approval, and frontend/UI unresponsiveness.
- If a session becomes stuck, Desktop should provide a reliable recovery path without requiring a new session.
Possible Areas to Investigate
- Whether Desktop repeatedly injects or over-injects approval transcript / tool output history.
- Whether
context_compactedcauses later turns to receive unexpectedly large or inefficient context. - Whether Desktop UI rendering of long reasoning/tool output blocks blocks interaction.
- Whether
turn_abortedrepresents explicit user interruption only, or also UI hangs where interruption is the only recovery path. - Differences between Desktop and CLI/TUI context assembly for the same workflows.
Notes
I can provide redacted snippets from the session logs if needed, but I would avoid attaching full raw jsonl logs publicly because they may include local paths, commands, repository names, and internal work context.