mirror of
https://github.com/openai/codex.git
synced 2026-11-26 23:40:43 +00:00
Show status for subagent waits without targets in the TUI (#64026)
## Why The TUI showed “Waiting for agents” even when a wait had no agent targets, and “Finished waiting” even when it failed or was interrupted. ## What changed When a wait has no receiver thread IDs or agent states, show “Waiting,” “Waited,” “Failed to wait,” or “Interrupted” according to its status. ## Testing Extend the collaboration transcript snapshot to cover all four statuses for waits without targets. GitOrigin-RevId: 62097034b160852b5921d869e0a04737b69923f9
This commit is contained in:
@@ -280,6 +280,15 @@ fn render_tool_call(
|
||||
)
|
||||
}
|
||||
}),
|
||||
CollabAgentTool::Wait if receiver_thread_ids.is_empty() && agents_states.is_empty() => {
|
||||
let title = match status {
|
||||
CollabAgentToolCallStatus::InProgress => "Waiting",
|
||||
CollabAgentToolCallStatus::Completed => "Waited",
|
||||
CollabAgentToolCallStatus::Failed => "Failed to wait",
|
||||
CollabAgentToolCallStatus::Interrupted => "Interrupted",
|
||||
};
|
||||
Some(collab_event(title_text(title), Vec::new()))
|
||||
}
|
||||
CollabAgentTool::Wait => {
|
||||
if matches!(status, CollabAgentToolCallStatus::InProgress) {
|
||||
Some(waiting_begin(receiver_thread_ids, &mut agent_metadata))
|
||||
@@ -854,8 +863,33 @@ mod tests {
|
||||
)
|
||||
.expect("close item renders");
|
||||
|
||||
let waits_without_targets = [
|
||||
CollabAgentToolCallStatus::InProgress,
|
||||
CollabAgentToolCallStatus::Completed,
|
||||
CollabAgentToolCallStatus::Failed,
|
||||
CollabAgentToolCallStatus::Interrupted,
|
||||
]
|
||||
.map(|status| {
|
||||
tool_call_history_cell(
|
||||
&ThreadItemPayload::CollabAgentToolCall {
|
||||
id: "wait-without-targets".to_string(),
|
||||
tool: CollabAgentTool::Wait,
|
||||
status,
|
||||
sender_thread_id: sender_thread_id.to_string(),
|
||||
receiver_thread_ids: Vec::new(),
|
||||
prompt: None,
|
||||
model: None,
|
||||
reasoning_effort: None,
|
||||
agents_states: HashMap::new(),
|
||||
},
|
||||
/*cached_spawn_request*/ None,
|
||||
|thread_id| metadata_for(thread_id, robie_id, bob_id),
|
||||
)
|
||||
.expect("wait without targets renders")
|
||||
});
|
||||
let snapshot = [spawn, send, waiting, finished, close]
|
||||
.iter()
|
||||
.chain(&waits_without_targets)
|
||||
.map(cell_to_text)
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n\n");
|
||||
|
||||
+8
@@ -15,3 +15,11 @@ expression: snapshot
|
||||
Bob [worker]: Error - tool timeout
|
||||
|
||||
• Closed Robie [explorer]
|
||||
|
||||
• Waiting
|
||||
|
||||
• Waited
|
||||
|
||||
• Failed to wait
|
||||
|
||||
• Interrupted
|
||||
|
||||
Reference in New Issue
Block a user