Skip to content

Clarify resume hints for renamed threads#23234

Merged
etraut-openai merged 2 commits into
mainfrom
etraut/clarify-resume-hints
May 18, 2026
Merged

Clarify resume hints for renamed threads#23234
etraut-openai merged 2 commits into
mainfrom
etraut/clarify-resume-hints

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented May 18, 2026

Addresses #23181

Why

Renamed threads can share names, so hints that suggest resuming directly by name are ambiguous. Issue #23181 asks for the picker hint to include the thread name and thread ID in parens so users can disambiguate safely.

What

  • Adds a shared resume hint formatter for named threads: run codex resume, then select <name> (<thread-id>).
  • Uses that hint for /rename confirmations, TUI session summaries, and CLI/TUI exit messages.
  • Keeps direct codex resume <thread-id> guidance for unnamed threads.

Verification

Manually verified that message after /rename and after /exit include session ID in parens.

## Why

PR #23234 updates the resume messaging for renamed threads to tell users
to pick `<name> (<thread-id>)` from the resume picker, but the expanded
picker details still hid the session id once a thread had a name.

That left a mismatch between the new guidance text and the picker UI.
When duplicate thread names exist, the expanded `Session:` field should
continue to expose the id so the user can verify they are about to
resume the right session.

## What Changed

- show `<thread-name> (<thread-id>)` in the resume picker `Session:`
field when both values are available
- keep the existing fallback behavior for unnamed sessions or rows
without an id
- update the existing picker rendering test to cover the combined
session label

## How to Test

1. Check out this branch on top of `etraut/clarify-resume-hints`.
2. Start Codex, create or resume a session, and rename it.
3. Open `codex resume` and expand the renamed session entry.
4. Confirm the `Session:` field shows `<thread-name> (<thread-id>)`
instead of hiding the id.

Also verify that:
1. A session without a thread name still shows just the thread id in the
`Session:` field.
2. The main row title in the picker is unchanged; this PR only updates
the expanded details view.

Targeted tests:
- `cargo test -p codex-tui expanded_session_details_include_metadata`

Note: `cargo test -p codex-tui` still fails in this worktree because of
an unrelated existing stack overflow in
`app::tests::discard_side_thread_removes_agent_navigation_entry`.
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Works as expected, code looks good!

@etraut-openai etraut-openai merged commit 4ac3ea2 into main May 18, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/clarify-resume-hints branch May 18, 2026 18:32
@github-actions github-actions Bot locked and limited conversation to collaborators May 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants