Skip to content

Desktop performance collapses in profiles with a few very large local conversation histories (typing, scrolling, thread list, random exits) #18693

Description

@twentyOne2x

Summary:
This is broader than slow thread switching. In profiles that contain a small number of extremely large local conversation histories, Codex desktop becomes slow across multiple surfaces: typing, scrolling inside a conversation, scrolling the thread list, delayed UI updates, slow thread switching, and occasional app exits. My strongest verified signal is not total conversation count, but the presence of a few giant local histories. Some of those heavy histories also had recurring thread heartbeat automations attached, which may amplify the problem, but that variable is not yet fully isolated.

Environment:

  • Codex desktop app 26.415.40636
  • macOS 26.3
  • MacBook Pro (Apple M3 Max, 16 CPU cores, 128 GB memory)

Observed

  • Typing can become very slow, roughly ~1s for words to appear.
  • Scrolling inside an existing conversation can become very slow.
  • Scrolling the thread list can become very slow.
  • UI updates such as archive notifications can arrive with noticeable delay.
  • Switching into some older conversations can take a very long time.
  • The app can also exit unexpectedly.
  • This appears Codex-specific on my machine: the slowdown can show up immediately inside Codex while the rest of the machine feels normal.

Verified A/B Repro

I tested this by comparing copied local profiles rather than only changing one profile in place.

Verified results:

  • A fresh test profile was smooth.
  • A copied profile that kept most of my original conversations but excluded the largest bloated ones was also smooth.
  • A copied profile that restored only a few very large historical conversations became slow again, even without the rest of my normal active conversations.

What this establishes:

  • The strongest correlation I can verify so far is the presence of a few giant local histories, not raw total conversation count by itself.
  • This is broader than thread-switch latency. The same profiles also show typing lag, scrolling lag, delayed UI updates, and occasional app exits.

What I have not isolated yet:

  • Whether simply archiving those same conversations inside the main profile would be enough to fix it.
  • Whether recurring thread heartbeat automations targeting those same heavy conversations are contributing independently, or mainly amplifying an existing history-size problem.

Hypotheses

These are hypotheses, not claims of proof:

  • The desktop app may be over-hydrating, resuming, or indexing a few massive local conversation histories.
  • Stale stored workspace roots may be adding background churn during startup and/or resume.
  • Recurring thread heartbeat automations attached to already-large conversations may amplify the problem by repeatedly waking expensive local histories.

My current read is that the issue is likely caused by some combination of:

  1. oversized local history payloads
  2. resume/read/index churn on those histories
  3. stale workspace-root scanning
  4. possibly heartbeat-driven repeated wakeups on the same heavy conversations

Diagnostics

Largest local histories on this machine, anonymized:

Local history Rollout size Turn contexts Function/tool calls
#1 1867.27 MiB 618 21,369
#2 584.72 MiB 5,554 22,434
#3 561.02 MiB 554 22,831
#4 507.22 MiB 428 17,991
#5 455.84 MiB 563 38,073

Additional local signals:

  • local state currently has 1767 total conversations, 777 unarchived
  • 40 stored workspace roots no longer exist
  • the desktop backend had 8 old session histories open totaling about 1.66 GiB
  • desktop logs showed thread resume/read/unsubscribe operations taking tens of seconds, with worst cases around 82s
  • startup also repeatedly scanned stale worktree/origin roots with very large expanded counts

Related issues

This may overlap with:

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingperformancesessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions