diff --git a/codex-rs/core/tests/suite/user_shell_cmd.rs b/codex-rs/core/tests/suite/user_shell_cmd.rs index 8171aa5d60..ea5c3adbfb 100644 --- a/codex-rs/core/tests/suite/user_shell_cmd.rs +++ b/codex-rs/core/tests/suite/user_shell_cmd.rs @@ -186,6 +186,8 @@ async fn user_shell_command_history_is_persisted_and_shared_with_model() -> anyh assert_eq!(end_event.exit_code, 0); assert_eq!(end_event.stdout.trim(), "not-set"); + let _ = wait_for_event(&test.codex, |ev| matches!(ev, EventMsg::TaskComplete(_))).await; + let responses = vec![responses::sse(vec![ responses::ev_response_created("resp-1"), responses::ev_assistant_message("msg-1", "done"),