[Bug]: Earlier chat history disappears from UI after context compaction, but remains accessible through t3_thread_read #23081
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
- Use a long-running T3 Code conversation with the Codex provider.
- Allow context compaction to occur.
- Inspect the visible conversation history.
- In this case, earlier messages were no longer visible.
- Read the same thread through
t3_thread_read; older messages were still returned.
Expected behavior#
Context compaction should reduce the model's active context while preserving the complete user-visible conversation history.
Earlier messages should remain accessible by scrolling or loading older messages.
Actual behavior#
Earlier messages disappeared from the visible conversation around the time of compaction.
However, a subsequent read through T3's own MCP tools confirmed that older messages were still stored and retrievable:
t3_thread_listreported more than 350 timeline items in the affected thread.t3_thread_read, usingview: "messages", returned the original user request and early assistant messages from the beginning of the conversation.- These were actual historical messages, not just the compaction summary.
This suggests a UI/history-loading issue rather than complete transcript deletion. The responsible layer has not been identified.
Impact#
Major degradation or frequent failure
Version or commit#
0.1.1
Environment#
macOS 15.6.1
Logs or stack traces#
Screenshots, recordings, or supporting files#
No response
Workaround#
No response
hajanet(GitHub profile, opens in a new tab) added labelsbug
hajanet(GitHub profile, opens in a new tab) added labelsneeds-triage
juliusmarminge added labelsneeds more info
juliusmarminge added labelsneeds-julius
juliusmarminge removed labelsneeds more info
Tried this again on current main (417bc79711) with real Codex compaction, in the web app and in the Linux desktop app:
- a 15-turn Codex thread compacted with
/compact - a Codex thread with 12 turns where Codex compacted automatically three times
In both, earlier messages stayed in the thread during compaction and after reopening it. When the thread opened on its latest turns, a "Load earlier turns" divider sat at the top, and one click brought back the first message.
To narrow it down:
- At the top of the affected thread, is there a "Load earlier turns" divider? If you click it, does anything change?
- Was most of the history inside one long run (one request followed by many tool calls)? If so, this may be https://git.cafe/pingdotgg/t3code/issues/21821: older pages load inside the collapsed "Worked for …" block, so the timeline looks unchanged.
- Your T3 Code desktop version (Settings → About) and
codex --version. - A screenshot of the top of the thread after scrolling all the way up.
- a 15-turn Codex thread compacted with
juliusmarminge added labelsneeds more info
Closing: no reply in 7 days after we asked for more information. Comment with the missing details and we will reopen.
Reproduced a similar history visibility problem on Linux, using desktop
0.1.8-nightly.20261105.4218connected through T3 Connect to a remote server whose service state records0.1.8-nightly.20261106.4288.In a long Codex thread, a user message from November 9 at 17:31:42 UTC remains missing when loading history through Load earlier turns. Closing/reopening the thread repeatedly did not help. Restarting T3 Code reproduced the problem.
Searching for the message finds a result. Initially, selecting it revealed and highlighted the message; later, selecting the same result failed to display it.
Read-only database checks confirm that both the message and its completed
user_messagetimeline entry remain stored. The thread contains 9,120 timeline items. The exact failure in history loading, merging, or navigation is not yet established; compaction has not been confirmed as the trigger.No configuration or database changes were made. No reliable workaround has been verified.
Julius has already tried unsuccessfully to reproduce this twice. I can share the actual affected thread privately over Discord so you can import it and test against the history that triggers the problem. Would that help, and what export format would you need?
Investigated through Codex using the T3 triage playbook.
Sign in to join this conversation.
I could not reproduce this on current main: with a 384-item Codex conversation and native compaction events, earlier history stayed accessible after compaction and after a reload, including through six history page loads. Could you share your exact Codex CLI version, whether the compaction was automatic or manual, a short recording of scrolling to the top and using Load earlier turns, and whether reopening the thread restores the history? Live automatic compaction on the macOS desktop app was not exercised here.