Skip to content

Fix custom tool output cleanup on stream failure#17470

Merged
etraut-openai merged 1 commit intomainfrom
etraut/custom-tool-failure
Apr 13, 2026
Merged

Fix custom tool output cleanup on stream failure#17470
etraut-openai merged 1 commit intomainfrom
etraut/custom-tool-failure

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

Addresses #16255

Problem: Incomplete Responses streams could leave completed custom tool outputs out of cleanup and retry prompts, making persisted history inconsistent and retries stale.

Solution: Route stream and output-item errors through shared cleanup, and rebuild retry prompts from fresh session history after the first attempt.

@jif-oai
Copy link
Copy Markdown
Collaborator

jif-oai commented Apr 13, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Bravo.

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

@etraut-openai etraut-openai merged commit a5783f9 into main Apr 13, 2026
36 of 38 checks passed
@etraut-openai etraut-openai deleted the etraut/custom-tool-failure branch April 13, 2026 15:35
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 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.

2 participants