Skip to content

Fix unresponsive UI during reasoning: show progress instead of blank screen - #8166

Closed
eric-distyl-ai wants to merge 3 commits into
openai:mainfrom
eric-distyl-ai:ey/flush-reasoning-parts-to-history
Closed

eric-distyl-ai wants to merge 3 commits into
openai:mainfrom
eric-distyl-ai:ey/flush-reasoning-parts-to-history

Conversation

@eric-distyl-ai

@eric-distyl-ai eric-distyl-ai commented Dec 17, 2025 •

Copy link
Copy Markdown

Problem

Codex appears frozen/unresponsive during reasoning - users see nothing happening for extended periods (30+ seconds) while the model thinks, leading to poor perceived latency. This has driven complaints on Twitter that "Claude Code feels faster" regardless of actual response times.

The root cause: reasoning content is accumulated silently in a buffer and only displayed after reasoning completes. Users stare at a static screen with no feedback.

Solution

Flush reasoning summary blocks to the UI immediately as they arrive rather than batching them until the end. This provides continuous visual feedback during long thinking periods.

Same prompt, same time elapsed, default settings

tui:

image

tui2:

image

Prompt:

Can you think about this problem? Don't look up the solution.

Let πe(G) denote the set of orders of elements of a group G, and h(Γ) the
number of non-isomorphic finite groups G with πe(G) = Γ. Do there exist two finite
groups G1, G2 such that πe(G1) = πe(G2), h(πe(G1)) < ∞, and neither of the two
groups G1, G2 is isomorphic to a subgroup or a quotient of a normal subgroup of the
other?

Changes

  1. Incremental display: Flush reasoning sections to history on section breaks instead of accumulating in full_reasoning_buffer
  2. Status header fix: Extract bold header before flushing so status doesn't flash to "Working" between sections
  3. Default visibility: Show reasoning summaries in main chat view by default (was hidden unless format was Experimental)

Test plan

  • Verify reasoning blocks appear incrementally during model responses
  • Confirm status header doesn't regress to "Working" between sections
  • Check reasoning summaries visible in main view without Ctrl+T

🤖 Generated with Claude Code

Co-Authored-By: gpt-5.2 [email protected]

@github-actions

github-actions Bot commented Dec 17, 2025 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@eric-distyl-ai eric-distyl-ai changed the title Fix reasoning blocks to render incrementally instead of batching until completion Make reasoning chattier: Display each reasoning summary block as it arrives Dec 17, 2025
@eric-distyl-ai

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@eric-distyl-ai
eric-distyl-ai force-pushed the ey/flush-reasoning-parts-to-history branch from d657aab to cc2baf9 Compare December 17, 2025 07:40
github-actions Bot added a commit that referenced this pull request Dec 17, 2025
@eric-distyl-ai

Copy link
Copy Markdown
Author

recheck

Fixes an issue where the status would show "Working" for longer than
necessary after flushing a reasoning section. By extracting the bold
header from the buffer before clearing it, the status maintains the
last meaningful header while waiting for the next section's content.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: gpt-5.2 <[email protected]>
@eric-distyl-ai
eric-distyl-ai marked this pull request as draft December 17, 2025 08:00
Previously, reasoning summaries were marked transcript_only when the
format wasn't Experimental, hiding them from the main chat view
(only visible via Ctrl+T). Now they display in the main view regardless
of format.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: gpt-5.2 <[email protected]>
@eric-distyl-ai eric-distyl-ai changed the title Make reasoning chattier: Display each reasoning summary block as it arrives Fix unresponsive UI during reasoning: show progress instead of blank screen Dec 17, 2025
@eric-distyl-ai
eric-distyl-ai marked this pull request as ready for review December 17, 2025 08:12
@eric-distyl-ai

eric-distyl-ai commented Dec 17, 2025 •

Copy link
Copy Markdown
Author

Prior Art & Related Issues

Claude Code searched the repo for related attempts to fix this problem:

Directly Related PRs

Related UI Responsiveness PRs

User-Reported Issues

External Perception

Web comparisons of Claude Code vs Codex CLI mention users experiencing "long periods where it feels like nothing is happening at all", which matches this PR's problem statement.

Takeaway

The transcript_only: true default for non-Experimental formats appears to have been an oversight that caused reasoning to be hidden from the main view for many model configurations. PR #3432 attempted to fix a related symptom but was closed. This PR addresses the root cause by:

  1. Showing reasoning in main view by default (transcript_only: false)
  2. Flushing incrementally on section breaks for better perceived responsiveness

"".to_string(),
full_reasoning_buffer,
true,
false,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested applying only this fix (changing transcript_only from true to false) without the incremental flushing changes. Result: reasoning summaries still didn't appear in the main view in any timely manner—they only showed up at the end after reasoning completed. The incremental flushing (in chatwidget.rs) is necessary for the improved perceived responsiveness.

@etraut-openai

Copy link
Copy Markdown
Contributor

We've updated our contribution guidelines to clarify that we're currently accepting contributions for bugs and security fixes, but we're not generally accepting new features at this time. We need to make sure that all new features compose well with both existing and upcoming features and fit into our roadmap. If you would like to propose a new feature, please file or upvote an enhancement request in the issue tracker. We will generally prioritize new features based on community feedback.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants