codex - ๐Ÿ’ก(How to fix) Fix Windows Codex app hangs indefinitely during context compaction after `responses/compact` on bundled agent `0.122.0-alpha.1` [1 comments, 2 participants]

Official PRs (โ€ฆ)
ON THIS PAGE

Recommended Tools

ร—6

Utilities matched from this issueโ€™s tags and category โ€” try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful ยท Quick feedback

Loadingโ€ฆ
GitHub stats
openai/codex#18363โ€ขFetched 2026-04-18 05:55:14
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
1
Timeline (top)
labeled ร—4commented ร—1cross-referenced ร—1unlabeled ร—1

On the Windows Codex app, long threads that trigger automatic context compaction can get stuck forever on the compaction state. The UI shows context compression in progress, but the thread never resumes.

From local logs, the app does send POST api.path="responses/compact", but I cannot find a corresponding completion event for the affected threads. The only way to recover is to force-close the window or quit the app, which then aborts the running task during shutdown.

This looks like a compaction pipeline hang or missing completion/return path, not just a fake UI spinner.

Error Message

  • If compaction fails, the app should surface a visible error and offer a recovery path instead of hanging indefinitely.

Root Cause

  • I did not find stuck local queue records in the state DB:
    • jobs
    • stage1_outputs
    • agent_jobs
  • Those tables were empty at inspection time, so this does not look like a leftover local background job backlog.
  • This appears more like the compaction request/response path hangs after responses/compact is initiated.
  • I also noticed a version shift:
    • older threads on this machine were using 0.119.0-alpha.28
    • affected recent threads are using 0.122.0-alpha.1
  • Because of that, this may be a regression introduced after a recent app/bundled-agent update.

Fix Action

Fix / Workaround

This makes long-running Windows app threads unreliable, because once the issue appears, the current practical workaround is to force-terminate the window or app and lose the live thread state.

RAW_BUFFERClick to expand / collapse

Summary

On the Windows Codex app, long threads that trigger automatic context compaction can get stuck forever on the compaction state. The UI shows context compression in progress, but the thread never resumes.

From local logs, the app does send POST api.path="responses/compact", but I cannot find a corresponding completion event for the affected threads. The only way to recover is to force-close the window or quit the app, which then aborts the running task during shutdown.

This looks like a compaction pipeline hang or missing completion/return path, not just a fake UI spinner.

Environment

  • Product: Codex app for Windows
  • OS: Windows
  • App package version: OpenAI.Codex 26.415.1938.0
  • Bundled agent / cli_version seen in affected threads: 0.122.0-alpha.1
  • Local standalone CLI on the same machine: codex-cli 0.120.0
  • Time zone: Asia/Singapore
  • Report date: April 18, 2026

Actual behavior

  • A long thread triggers automatic context compaction.
  • The UI remains stuck in the compaction state indefinitely.
  • The thread does not continue.
  • Closing the window or quitting the app triggers shutdown.
  • Shutdown logs show the running task being aborted instead of compaction finishing cleanly.

Expected behavior

  • Context compaction should complete and the thread should continue normally.
  • If compaction fails, the app should surface a visible error and offer a recovery path instead of hanging indefinitely.

What I found locally

I checked local session logs and SQLite logs/state.

Affected thread 1

  • thread_id = 019d9c1e-b65a-7142-ace4-d0b0c160d8a7
  • 2026-04-18 00:07:00 local time: POST api.path="responses/compact" appears in logs
  • No matching compact completion log found
  • 2026-04-18 00:11:44 local time: shutdown aborts the running task
  • Shutdown logs include:
    • aborting running task
    • didn't complete gracefully after 100ms

Affected thread 2

  • thread_id = 019d9c33-94dc-7bd0-991f-c0321b2ad438
  • 2026-04-18 00:51:17 local time: POST api.path="responses/compact" appears in logs
  • No matching compact completion log found
  • 2026-04-18 00:59:18 local time: shutdown aborts the running task
  • Shutdown logs include:
    • aborting running task
    • didn't complete gracefully after 100ms

Additional observations

  • I did not find stuck local queue records in the state DB:
    • jobs
    • stage1_outputs
    • agent_jobs
  • Those tables were empty at inspection time, so this does not look like a leftover local background job backlog.
  • This appears more like the compaction request/response path hangs after responses/compact is initiated.
  • I also noticed a version shift:
    • older threads on this machine were using 0.119.0-alpha.28
    • affected recent threads are using 0.122.0-alpha.1
  • Because of that, this may be a regression introduced after a recent app/bundled-agent update.

Impact

This makes long-running Windows app threads unreliable, because once the issue appears, the current practical workaround is to force-terminate the window or app and lose the live thread state.

Available evidence

I have local evidence available, including:

  • session transcripts under $CODEX_HOME/sessions
  • local SQLite logs/state inspection results
  • a sanitized local incident report with timestamps and affected thread IDs

I can provide sanitized excerpts if needed.

extent analysis

TL;DR

The issue can likely be mitigated by investigating and addressing the regression introduced in the recent app or bundled-agent update, specifically the change from 0.119.0-alpha.28 to 0.122.0-alpha.1.

Guidance

  • Investigate the differences between 0.119.0-alpha.28 and 0.122.0-alpha.1 to identify potential causes of the regression.
  • Review the code changes and API interactions related to the responses/compact endpoint to ensure proper completion handling.
  • Analyze the shutdown logs to understand why the running task is being aborted instead of completing gracefully.
  • Consider temporarily downgrading the bundled agent to 0.119.0-alpha.28 to verify if the issue is indeed related to the version change.

Example

No code snippet is provided due to the lack of specific code details in the issue.

Notes

The issue seems to be related to a regression introduced in a recent update, and addressing this regression is likely to resolve the problem. However, without more information about the code changes and API interactions, it's difficult to provide a more specific solution.

Recommendation

Apply a workaround by temporarily downgrading the bundled agent to 0.119.0-alpha.28 to verify if the issue is indeed related to the version change, and then work on addressing the regression in the updated version.

Vote matrix ยท Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loadingโ€ฆ

FAQ

Expected behavior

  • Context compaction should complete and the thread should continue normally.
  • If compaction fails, the app should surface a visible error and offer a recovery path instead of hanging indefinitely.

Still need to ship something?

ร—6

Another batch ranked right after the header list โ€” different links, same matching logic.

Back to top recommendations

TRENDING

codex - ๐Ÿ’ก(How to fix) Fix Windows Codex app hangs indefinitely during context compaction after `responses/compact` on bundled agent `0.122.0-alpha.1` [1 comments, 2 participants]