Skip to content

fix: publish session titles during the first turn - #811

Merged
benbrandt merged 2 commits into
mainfrom
fix/early-session-titles
Nov 26, 2026
Merged

benbrandt merged 2 commits into
mainfrom
fix/early-session-titles

Conversation

@benbrandt

@benbrandt benbrandt commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

A long first turn could leave a new session unnamed while tools ran or waited for approval. On ACP v1 and v2, start title generation as soon as Codex records the first nonblank user message. Send the generated name in session_info_update as soon as Codex saves it. If generation fails, returns no usable title, or the save fails, send the normalized prompt text as the fallback. The main turn can finish while generation is still pending.

Use the original ACP text so embedded file contents stay out of titles. Match v1 prompts without a client message ID to their accepted turn, including when the recorded item arrives before the turn/start response. A steered prompt can supply the first title. An explicit rename takes precedence.

Codex can return a prompt preview while reopening a live thread. Preserve the in-flight title across load and resume so that preview cannot replace it.

Verification

  • Ran Codex 0.172.0 against a local mock model on ACP v1 and v2. Holding the main answer open produced one generated title. Returning invalid output after the main answer finished produced one prompt-text fallback. A second prompt kept the title in all four cases.
  • Covered failed title writes, explicit renames, reopening during generation, and rename notifications arriving before or after the write acknowledgement.
  • Typecheck and build passed. The unit suite passed 2,798 tests with 39 skipped. All 28 integration tests passed on rerun. A background-terminal ordering assertion failed once in a session with an explicit title.

@benbrandt
benbrandt merged commit 08746f8 into main Nov 26, 2026
7 checks passed
@benbrandt
benbrandt deleted the fix/early-session-titles branch November 26, 2026 12:30
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.

1 participant