Skip to content

Long-running threads: unbounded memory growth, auto-resume of all open conversations, rollout corruption on mid-call close, scroll anchoring broken #40934

Open

Description

@autonomouscereal

Summary

Long-running threads (10k–150k rollout items, kept intentionally) make Codex desktop progressively unstable: unbounded memory growth, aggressive auto-resume of every open conversation at launch, corrupted rollouts when the app closes mid-tool-call, and scroll-position jumping in long transcripts.

Environment

Windows 11 Pro (26200), Codex desktop MSIX 26.820.7780.0, bundled codex-cli 0.150.0-alpha.8.

Details

  1. Auto-resume of all open conversations on every launch, concurrently. With two large threads open (12.7k and 146k items), the app-server codex.exe reached 7.6–15.4 GB RSS and stayed there; memory does not stabilize after resume completes. Suggest lazy resume (on focus), and bounding resident history.

  2. Closing the app mid-tool-call corrupts the rollout. The in-flight call's output is never recorded; on next resume the session fails Custom tool call output is missing for call id: ... and retry-loops indefinitely (blocking that thread for local and remote use). We repaired manually by appending a synthesized custom_tool_call_output ("output lost, treat as aborted") — the session then resumes with parse errors: 0. Suggest the resume path synthesize exactly that instead of erroring.

  3. Scroll-position anchoring in very long threads is broken — the transcript randomly jumps up/down during streaming in large conversations, which makes long-queue sessions hard to use and appears to amplify memory/render pressure.

  4. Attestation warning on every turn: attestation generation request timed out timeout_seconds=0 — the zero-second timeout looks like a misconfigured flag; it fires constantly during normal turns.

Ask

Long-lived, ever-growing threads are a legitimate workflow. The app currently pays O(full thread) costs at launch, attach, and render time. Bounding resident state (pagination/windowing at every layer: resume, memory, UI) would fix the whole class.

Activity

  1. added
    bug
    app
    windows-os
    app-server
    session
    on Aug 26, 2026
  2. TAKURO-FU commented on Aug 27, 2026

    @TAKURO-FU

    Additional Windows reproduction on Codex Desktop 26.820.7780.0:

    • As of 2026-08-27, the issue had been occurring for about two days.
    • Codex Desktop would freeze while its memory usage continued increasing.
    • Observed memory usage exceeded 10 GB and kept growing.
    • The rest of Windows became effectively unusable while Codex was in this state.
    • Force-quitting Codex immediately restored normal PC operation.
    • Rebooting Windows did not resolve the behavior; it reproduced after restart.
    • Task Manager screenshots during one reproduction showed Codex memory increasing from roughly 4.1 GB to 5.1 GB, and it later exceeded 10 GB.
    • Installed app version shown in Windows was 26.820.7780.0.
    • Uninstalling and reinstalling the desktop app resolved the issue. After reinstall, the memory runaway/freezing stopped.

    No project files or local Codex state were manually deleted as part of the fix; the user performed a normal uninstall/reinstall.

  3. nos1609 commented on Aug 29, 2026

    @nos1609

    Additional cross-host reproduction of item 2 on current builds:

    Environment

    • Codex Desktop 26.825.5331.0 on Windows
    • Remote Linux task served by codex-cli 0.150.1
    • Long-lived legacy thread

    Observed

    • Desktop remained on task loading / notLoaded.
    • The native thread API could still reconstruct recent turns, including the final interrupted turn.
    • The app-server repeatedly logged Custom tool call output is missing for call id: ....
    • The canonical rollout was structurally valid: 578,007,630 bytes, 118,700 valid JSONL records, and zero invalid records.
    • Its final record was one custom_tool_call with no matching custom_tool_call_output. No process still had the archived rollout open.

    Archive/unarchive alone did not synthesize the missing result.

    Reversible recovery

    1. Archive only the affected task.
    2. Make and hash-verify a byte-identical backup.
    3. Append exactly one custom_tool_call_output for the orphaned final call with output: "aborted".
    4. Validate 118,701/118,701 JSONL records and a 1:1 call/output balance.
    5. Unarchive the task.

    After that, native history reconstruction returned the recent turns again, direct navigation succeeded, and no new missing-output error appeared. The shared app-server was not restarted.

    This supports the proposed product fix: when resuming an interrupted thread whose valid rollout ends in an unmatched tool call, Codex should durably synthesize an aborted output instead of leaving the thread permanently unloadable. The recovery should be atomic and should not require manual JSONL editing.

  4. autonomouscereal commented on Sep 22, 2026

    @autonomouscereal
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appapp-serverbugperformancesessionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions