Skip to content

Codex stale-thinking spinner persists after stream state desync (thread stale detection + targeted recovery results) #12955

@g0udurix

Description

@g0udurix

Reproducibility summary

  • Date: 2026-02-26 (UTC)
  • Scope: local sessions under ~/.codex/sessions, ~/.codex/archived_sessions, app logs under ~/Library/Logs/com.openai.codex.
  • Detector is read-only for discovery; recovery attempts are targeted per-thread only.
  • This issue is tracked with generated artifacts under:
    • /Users/jeremie/.codex/reports/codex-stale-thinking/2026-02-26/20260226T221328Z/
  • No raw conversation text or secrets are included in the artifacts.

Key stale indicators

  • 019c9a7f-46f2-7e03-aceb-89afe89a581b => stale score=12.6, unmatched_starts=2, heartbeat_ms=4650543, in_progress_stream=true, marked_streaming=true, turn_not_found_count=1272.
  • 019c489a-0eb0-7142-8c30-e92ced2cf74a => at-risk score=5.8, unmatched_starts=0, heartbeat_ms=8332044, in_progress_stream=true, marked_streaming=true, turn_not_found_count=0.

Recovery results from tooling

  • Targeted conservative recovery (--recover) was executed per-thread after detection on the two above threads.
  • For both threads, the app-server returned RPC error: thread not found during turn/interrupt.
  • Recovery status was tracked as thread_not_found; operator guidance is to continue in a fresh thread using a compact handoff of last confirmed artifacts.

Observable loop behavior

  • Thread UI remains in thinking/streaming indications after maybe_resume_success appears with latestTurnStatus=inProgress and markedStreaming=true.
  • Turn not found for event and thread-stream-state-changed / handler warning patterns continue in logs around those thread IDs.
  • This suggests a stream-state reconciliation or state-database migration/cleanup race rather than pure compute inactivity.

Ask

  • Please investigate stream-state lifecycle for thread-stream-state-changed, maybe_resume_success, and Turn not found for event reconciliation.
  • Confirm whether stale stream markers should be auto-cleared when referenced turns are no longer resolvable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions