Skip to content

Large active session causes global freezes with no UI attribution #21948

Open

Description

@shawn-energycanvas

What version of the Codex App are you using (From “About Codex” dialog)?

25.506.31421

What subscription do you have?

Pro

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

Codex Desktop became intermittently unresponsive during normal use. The freezes affected the whole app, even when I was not engaging with the session that ultimately appeared to be responsible.

The issue stopped after I archived a single session. That session was browser-use heavy and contained many screenshots, DOM/snapshot payloads, and large embedded image/base64 artifacts. The session was about 173 MB.

The main issue is that Codex gave no indication that a particular session was problematic. Nothing in the UI pointed to session size, browser artifacts, background processing, or archiving as a possible fix. From the user’s perspective, there was no intuitive reason to suspect that one session in the left panel could degrade global app performance while working elsewhere.

What steps can reproduce the bug?

I do not have a minimal code snippet, but the observed repro pattern is:

  1. Use Codex Desktop with a browser-use-heavy session that accumulates many screenshots, DOM/snapshot payloads, and embedded data:image / base64 artifacts.
  2. Let that session remain active/unarchived in the left panel.
  3. Continue using Codex, including other sessions.
  4. Codex Desktop begins having repeated small hangs/freezes globally.
  5. Archive the browser-use-heavy session.
  6. Continue using Codex.
  7. The freezes stop.

How I identified it:

  1. Windows logs showed Codex/OpenAI app hang reports.
  2. A local log/database cleanup reduced accumulated local log storage, but smaller freezes continued.
  3. The freezes stopped only after one browser-use-heavy session was archived.
  4. I sorted active and archived session files by size.
  5. The recently archived session stood out at about 173 MB.
  6. Inspecting the JSONL showed about 163 MB concentrated in only 20 records over 1 MB each.
  7. The largest records were about 52 MB and 32 MB, both compaction records containing browser-heavy history.

What is the expected behavior?

One inactive or not-currently-engaged-with session should not degrade responsiveness across the whole Codex Desktop app without attribution.

Codex should either avoid expensive background processing of oversized inactive sessions or clearly identify the problem. Expected behavior would include one or more of:

  • warning when a session becomes unusually large,
  • warning when a session contains large embedded browser artifacts,
  • showing session size in the UI,
  • identifying which session is being processed when the app hangs or becomes busy,
  • throttling or excluding oversized inactive sessions from expensive background work,
  • deduplicating or externalizing large browser screenshots/base64/DOM artifacts,
  • recommending archive/cleanup when a session is likely affecting performance.

Additional information

System details, to help rule out weak hardware:

  • Dell laptop, Dell Pro Max 16 Premium MA16250
  • System SKU / part number: 0D33
  • Windows 11 Pro, 64-bit, build 26200
  • CPU: Intel Core Ultra 9 285H
  • RAM: about 64 GB
  • Disk: 2 TB NVMe SSD, healthy, about 604 GB free at capture time
  • Display: 3840 x 2400 at 120 Hz
  • Active graphics path should be treated as Intel Arc Pro 140T GPU
  • NVIDIA RTX PRO 3000 Blackwell Generation Laptop GPU was present but disabled in Device Manager with Code 22
  • Codex app package observed: 26.506.3741.0

Windows evidence captured:

  • 5,072 filtered Application events
  • 2,303 filtered System events
  • 6 copied Windows Error Reporting reports matching OpenAI app hangs
  • The copied WER reports included Codex desktop app hang reports.

Activity

  1. added
    bugSomething isn't working
    windows-osIssues related to Codex on Windows systems
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on May 9, 2026
  2. github-actions commented on May 9, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. cnjimmyshao commented on May 9, 2026

    @cnjimmyshao

    This looks likely related to #18629, especially the part about embedded data:image / base64 artifacts in active session JSONL causing Desktop-wide responsiveness issues.

    I added a more code-path-oriented storage-layer analysis in #18629 here:
    #18629 (comment)

    The overlap, as I understand it, is that UI pagination/lazy hydration can reduce the thread-open symptoms, but image-heavy rollouts can still keep growing if replayable JSONL stores large image blobs inline. A durable fix probably needs to prevent new rollout records from persisting those blobs inline in the first place, while keeping old histories readable.

  4. psremilio commented on May 13, 2026

    @psremilio

    Same issue here on Windows.

    Codex Desktop 26.506.3741.0 becomes repeatedly unresponsive in longer chats: the UI freezes, briefly recovers, then freezes again until Windows shows the wait/close-app prompt. Windows Error Reporting logs AppHangTransient for Codex.exe.

    This correlates strongly with large local state on my machine:

    • %USERPROFILE%\.codex: about 3.23 GB
    • sessions: about 2.06 GB
    • one recent session JSONL: about 424 MB
    • logs_2.sqlite + WAL: about 619 MB

    System resources are not generally exhausted, so this looks like the desktop app is doing expensive session/log loading, rendering, indexing, or background processing against large local state.

  5. ericlee041769-hash commented on Jul 15, 2026

    @ericlee041769-hash

    I can reproduce the same bug on a much newer Windows build/app package, with large multi-agent sessions rather than browser screenshots.

    Environment:

    • Windows 11 Pro x64, build 26200
    • 32 GB RAM
    • Microsoft Store package: OpenAI.Codex 26.707.3748.0
    • Desktop app-server client version in logs: 26.707.31428

    User-visible failure:

    • Codex Desktop became progressively slower and intermittently made the whole PC feel frozen.
    • The desktop eventually showed the Codex app-server crash page twice:
      • (code=3221226505, signal=null)
      • memory allocation of 236144 bytes failed
      • a second capture showed memory allocation of 32768 bytes failed.

    Local profile evidence before cleanup:

    • ~/.codex/sessions: 4.155 GB.
    • One still-active user thread: 167.24 MB rollout JSONL.
    • Completed subagent rollouts under that thread: 443.72 MB, 140.21 MB, 128.60 MB, 81.63 MB, 49.48 MB, and 34.41 MB.
    • A previous duplicate parent thread was 148.01 MB, with additional completed subagent rollouts of 87.25 MB, 84.58 MB, 84.48 MB, 67.73 MB, 43.53 MB, and 33.13 MB.
    • state_5.sqlite reported tokens_used=1,434,782,369 for the active parent and 1,227,782,546 for one completed subagent.
    • thread_spawn_edges still had 17 open children for the active parent, 54 for the previous duplicate parent, and 46 for an older duplicate parent. The child work had already finished.
    • The public archive API successfully archived the old user-owned parents, but attempting to archive the very large subagent thread IDs returned No Codex thread found. There is no supported UI/API cleanup path for these hidden oversized child sessions.

    The log sink amplified the problem:

    • logs_2.sqlite: 1,339,052,032 bytes after only 10 days.
    • 351,361 retained rows, 649,509,829 estimated bytes.
    • The DB contained TRACE rows even though the process environment had RUST_LOG=warn.
    • Dominant targets included codex_api::sse::responses (106,891 rows), codex_core::stream_events_utils (49,629), and codex_mcp::connection_manager (90,452).
    • Keeping only the most recent 24 hours and running VACUUM reduced the DB to 210,612,224 bytes.

    Mitigations performed:

    • archived two old duplicate user-owned parent threads through the official app API;
    • pruned/vacuumed the log DB while preserving the last 24 hours;
    • removed a separately broken remote plugin sync;
    • removed an unrelated stalled local workload that was consuming commit memory, to prevent it from confounding further tests.

    This still looks like an app scalability/lifecycle bug, not merely weak hardware:

    1. inactive/completed subagent rollouts can be hundreds of MB each;
    2. completed child edges can remain open;
    3. hidden subagent sessions cannot be archived through the supported thread archive API;
    4. normal desktop logging persists large TRACE payloads and leaves a >1 GB SQLite file;
    5. the UI provides no attribution or warning before global lag/crash.

    Requested fixes:

    • bound/lazy-load inactive parent and subagent history;
    • close completed spawn edges durably;
    • archive/cold-store child rollouts when their parent is archived;
    • provide a supported “clean up large task” action that preserves the final summary;
    • cap or disable large TRACE/SSE payload persistence in normal desktop builds;
    • make low-memory failure degrade one thread safely instead of aborting the whole app-server.

    This appears closely related to #20213, #21134, and the meta issue #25779, but #21948 is the closest Windows user-visible repro.

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

    appIssues related to the Codex desktop appbrowserbugSomething isn't workingperformancesessionIssues involving session (thread) management, resuming, forking, naming, archivingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions