Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions codex-rs/app-server-protocol/src/protocol/thread_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,7 @@ mod tests {
turn_id: "turn-1".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -1821,6 +1822,7 @@ mod tests {
turn_id: "turn-1".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -1924,6 +1926,7 @@ mod tests {
turn_id: turn_id.to_string(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -1976,6 +1979,7 @@ mod tests {
turn_id: turn_id.to_string(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -2029,6 +2033,7 @@ mod tests {
turn_id: turn_id.to_string(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -2093,6 +2098,7 @@ mod tests {
turn_id: turn_id.to_string(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -2162,6 +2168,7 @@ mod tests {
turn_id: turn_id.to_string(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -2241,6 +2248,7 @@ mod tests {
turn_id: "turn-image".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -2594,6 +2602,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3163,6 +3172,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3206,6 +3216,7 @@ mod tests {
turn_id: "turn-b".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3263,6 +3274,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3306,6 +3318,7 @@ mod tests {
turn_id: "turn-b".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3495,6 +3508,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand All @@ -3518,6 +3532,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand All @@ -3531,6 +3546,7 @@ mod tests {
turn_id: "turn-b".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3570,6 +3586,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3637,6 +3654,7 @@ mod tests {
turn_id: "turn-compact".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3900,6 +3918,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -3966,6 +3985,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -4022,6 +4042,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -4104,6 +4125,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -4270,6 +4292,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: Some(20),
duration_ms: Some(123),
time_to_first_token_ms: None,
Expand Down Expand Up @@ -4351,6 +4374,7 @@ mod tests {
turn_id: "turn-a".into(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: Some(20),
duration_ms: Some(123),
time_to_first_token_ms: None,
Expand Down
1 change: 1 addition & 0 deletions codex-rs/app-server/src/bespoke_event_handling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2193,6 +2193,7 @@ mod tests {
turn_id: turn_id.to_string(),
started_at: None,
last_agent_message: None,
error: None,
completed_at: Some(TEST_TURN_COMPLETED_AT),
duration_ms: Some(TEST_TURN_DURATION_MS),
time_to_first_token_ms: None,
Expand Down
1 change: 1 addition & 0 deletions codex-rs/core/src/agent/control/residency_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ async fn mark_thread_completed(thread: &CodexThread) {
turn_id: turn.sub_id.clone(),
started_at: None,
last_agent_message: Some("done".to_string()),
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down
3 changes: 3 additions & 0 deletions codex-rs/core/src/agent/control_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ async fn on_event_updates_status_from_task_complete() {
turn_id: "turn-1".to_string(),
started_at: None,
last_agent_message: Some("done".to_string()),
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -2029,6 +2030,7 @@ async fn multi_agent_v2_completion_ignores_dead_direct_parent() {
turn_id: tester_turn.sub_id.clone(),
started_at: None,
last_agent_message: Some("done".to_string()),
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down Expand Up @@ -2117,6 +2119,7 @@ async fn multi_agent_v2_completion_queues_message_for_direct_parent() {
turn_id: tester_turn.sub_id.clone(),
started_at: None,
last_agent_message: Some("done".to_string()),
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: None,
Expand Down
1 change: 1 addition & 0 deletions codex-rs/core/src/guardian/review_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ mod tests {
turn_id: turn_id.to_string(),
started_at: None,
last_agent_message: last_agent_message.map(str::to_string),
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms,
Expand Down
1 change: 1 addition & 0 deletions codex-rs/core/src/guardian/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2234,6 +2234,7 @@ async fn guardian_reused_trunk_ignores_stale_prior_turn_completion() -> anyhow::
"{\"risk_level\":\"high\",\"user_authorization\":\"low\",\"outcome\":\"deny\",\"rationale\":\"stale guardian rationale\"}"
.to_string(),
),
error: None,
completed_at: None,
duration_ms: None,
time_to_first_token_ms: Some(1),
Expand Down
4 changes: 2 additions & 2 deletions codex-rs/core/src/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,7 @@ impl Session {
.terminal_error
.lock()
.await
.replace(error.message.clone());
.replace(error.clone());
}
self.services
.rollout_thread_trace
Expand Down Expand Up @@ -1834,7 +1834,7 @@ impl Session {

let status = match turn_context.terminal_error.lock().await.take() {
Some(error) => {
let status = AgentStatus::Errored(error);
let status = AgentStatus::Errored(error.message);
self.agent_status.send_replace(status.clone());
status
}
Expand Down
Loading
Loading