Skip to content

feat: keep dead agents in the agent picker#12570

Merged
jif-oai merged 3 commits intomainfrom
jif/agent-picker-2
Feb 23, 2026
Merged

feat: keep dead agents in the agent picker#12570
jif-oai merged 3 commits intomainfrom
jif/agent-picker-2

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Feb 23, 2026

No description provided.

@jif-oai
Copy link
Collaborator Author

jif-oai commented Feb 23, 2026

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

codex/codex-rs/tui/src/app.rs

Lines 996 to 1002 in 3c942c3

let Some((receiver, snapshot)) = self.activate_thread_for_replay(thread_id).await else {
self.chat_widget
.add_error_message(format!("Agent thread {thread_id} is already active."));
if let Some(previous_thread_id) = previous_thread_id {
self.activate_thread_channel(previous_thread_id).await;
}
return Ok(());

P1 Badge Allow reopening closed agent threads

select_agent_thread treats activate_thread_for_replay(..) returning None as “already active”. For closed threads this happens after one replay: drain_active_thread_events consumes a disconnected receiver and clears it, so subsequent selections of the same dead agent always fail with an incorrect error. This breaks the new picker behavior because dead agents remain listed but cannot be reopened.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector
Copy link
Contributor

Security review completed. No security issues were found in this pull request.

View security finding report

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@jif-oai jif-oai merged commit 829d108 into main Feb 23, 2026
30 of 32 checks passed
@jif-oai jif-oai deleted the jif/agent-picker-2 branch February 23, 2026 12:58
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 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.

1 participant