openai / openai/codex

[Desktop][Linux] Completed-turn collapse hides assistant replies — root cause and minimal patch

Open
#43,618 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug Linux
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using?

Linux Debian package chatgpt version 26.901.51231 (the package version used for the renderer investigation and patch checks).

What subscription do you have?

ChatGPT Pro 20x.

What platform is your computer?

Debian Linux, x86_64.

What issue are you seeing?

Assistant commentary and earlier final answers can disappear from the normal transcript when a completed turn's activity collapses. Interleaved user follow-ups can remain visible, creating an apparently unanswered sequence of instructions even though the renderer still has the assistant replies.

Related reports: #42017 and #39011. This report records a specific Linux renderer cause, an isolated reproduction, and reusable candidate-fix code. The analysis was first posted in this technical follow-up.

Source and proposed solution: chatgpt-message-visibility-patcher, including the one-line renderer change. Maintainers are welcome to use this repository as the source for the code and port the solution into the desktop renderer.

What steps can reproduce the bug?

The deterministic reproduction is at the renderer component level:

  1. Supply a synthetic turn containing, in order: user U0, commentary A1, a tool row, accepted steering user U1, final F1, a second tool row, commentary A2, final F2.
  2. Render the completed turn with activity collapsed.
  3. Compare visible authored rows before and after the candidate predicate change below, then expand and re-collapse activity.

Observed in the isolated browser harness:

  • Original collapsed view: U0, U1, F2. A1, F1, and A2 are hidden.
  • Patched collapsed view: all six authored messages in source order; tools remain collapsible.
  • Expanded view: the same eight rows before and after the patch, each appearing once.
What is the expected behavior?

Authored, user-visible assistant and user messages should remain visible in chronological position after task completion. Tool activity can remain collapsible. Preserving authored prose is preferable even when some text repeats.

Additional information

Located cause

In webview/assets/subagent-activity-chip-group-f888d636e4fc.js, the minified KE function decides which standalone activity units remain visible when activity is collapsed. It retains certain interactive tools and user messages with steering or hook metadata, but excludes assistant messages. GE partitions the units, $E allows automatic collapse after the final answer starts, and tD renders persistent units outside the collapsed activity body.

Minimal candidate fix

Keep the existing tool cases and replace the classifier's final predicate:

- i.type === `user-message` &&
-   (i.steeringStatus != null || i.hookFeedback === true)
+ i.type === `assistant-message` || i.type === `user-message`

This keeps standalone authored messages persistent, including commentary and earlier final answers. The change is limited to renderer visibility.

Validation and limits

The browser harness executed the shipped collapse component and decision functions with substitute providers, unit projection, message leaves, and animation wrappers. Live-to-final transitions, expand/re-collapse, and serialized fixture/browser reload checks passed. Separate renderer projection tests passed 577 assertions over 64 synthetic snapshots. Archive tests covered syntax, integrity hashes, unchanged offsets and unrelated bytes, idempotence, backups, rollback, and permissions; synthetic compatible-upgrade cases also passed.

These are component and archive checks, not a full desktop end-to-end or app-server persistence test. Reconnect, history pagination, and mobile behavior remain outside the verified scope.

The linked repository provides a reversible local installer with automatic reapplication after compatible APT updates. Unknown renderer structures are left untouched with a warning. The original one-line contribution is available under MIT OR CC0-1.0; original tooling is MIT, with Acorn's separate MIT notice retained. Since the affected desktop source is absent from the public tree, the code is offered for maintainer adaptation through this report.

All original work on the patch project, including this investigation and report, was done with GPT-6 Astra Ultra.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with webview/assets/subagent-activity-chip-group-f888d636e4fc.js, especially the minified KE classifier and the related GE, $E, and tD functions that control collapsed activity visibility. Reproduce the synthetic completed turn in the browser harness, then verify that authored messages remain visible while tools stay collapsible and that expand/re-collapse behavior and the reported renderer checks still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, linux
Domain
desktop, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.