Skip to content

feat: make task return a more complex type#16259

Closed
jif-oai wants to merge 5 commits intomainfrom
jif/fix-one-shot-2
Closed

feat: make task return a more complex type#16259
jif-oai wants to merge 5 commits intomainfrom
jif/fix-one-shot-2

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented Mar 30, 2026

No description provided.

@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented Mar 30, 2026

@codex review

Copy link
Copy Markdown
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

Here are some automated review suggestions for this pull request.

Reviewed commit: 0257728856

ℹ️ 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".

@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented Mar 30, 2026

@codex review

Copy link
Copy Markdown
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

Here are some automated review suggestions for this pull request.

Reviewed commit: 51062332c2

ℹ️ 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".

Comment on lines +1862 to +1865
#[serde(untagged)]
pub enum TurnOutcome {
Succeeded { last_agent_message: Option<String> },
Failed { error: ErrorEvent },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Disambiguate TurnOutcome untagged deserialization

TurnOutcome is #[serde(untagged)] with Succeeded { last_agent_message: Option<String> } listed before Failed { error: ErrorEvent }. Because unknown fields are ignored, payloads like { "error": ... } can deserialize as Succeeded { last_agent_message: None }, dropping failure details. This can misclassify failed turns after JSON round-trips (e.g., rollout replay/resume).

Useful? React with 👍 / 👎.

Comment on lines +6934 to +6935
codex_protocol::protocol::TurnOutcome::Failed { error } => {
self.on_error(error.message);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Badge Route failed TurnComplete through codex_error_info handling

The failed TurnComplete branch calls on_error(error.message) directly, which bypasses the existing EventMsg::Error logic that interprets codex_error_info (e.g., server overload and steer-rejection handling). As a result, failed turns with structured error metadata are treated as generic errors and lose specialized UX/recovery behavior.

Useful? React with 👍 / 👎.

Comment on lines +930 to +933
TurnOutcome::Failed { error } => {
turn.status = TurnStatus::Failed;
turn.error = Some(V2TurnError {
message: error.message.clone(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge Honor affects_turn_status when replaying failed outcomes

Thread-history reconstruction marks every TurnOutcome::Failed as TurnStatus::Failed unconditionally. Live app-server handling now gates failure on error.affects_turn_status(), so replay/resume can diverge from live behavior and incorrectly mark non-fatal failures as failed turns.

Useful? React with 👍 / 👎.

@jif-oai jif-oai closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant