Repository navigation
Trace retries on one model span in Python and Codex - #6144
markstuart-oai wants to merge 46 commits into
Conversation
…estart (#6115) * Resume pending Codex commands and file edits after a worker restart * Reject repeat execution under an already completed native approval
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Approved after comprehensive static review and independent Python and native tracing reviews. Reviewed the follow-up to #6106 at 8ede460: logical retry grouping and span lifetime, usage aggregation, capture revocation, OpenAI raw-response retry observation, HTTP/WebSocket request identity and Core callback ordering, native source bounds, approval outcomes, and OpenTelemetry retry events and payload selection. The inherited #6106 changes were reviewed separately. No actionable findings.
Reviewed the provider/stream/capture-mode parity matrix, timeout replay and changed-request cases, privacy veto, and installed-wheel workflow. Responses and Codex now use response spans across capture modes; Chat Completions retains generation spans. Retry observations are capped at 128 and do not imply a hard request or cost budget.
Hosted CI completed: 33 passed, 4 skipped. Static review only; no candidate code, local tests, or native builds executed.
There was a problem hiding this comment.
Approved after static incremental review and an independent second review. This carries forward the terminal command-result fix already reviewed in #6106: restore requires the matching call, an exited process and no live handle; the resolver uses that result rather than depending on a delayed exit event. Reviewed the error paths and delayed-exit installed-wheel fixture, and verified the four incremental patches match the previously reviewed fix. No new actionable findings.
Hosted CI completed: 33 passed, 2 skipped. Static review only; no candidate code, local tests or native builds executed.
Summary
Merge options — One squash of this PR for #6106 and the tracing changes together. For separate squashes, #6106 first, then a branch update here against the resulting commit. Review just the follow-up. Draft user guide in #6107.
With
operation_detailomitted, a Runner retry has been increasing the model-call count. Enabling content capture has also been changing the SDK span type.Python Responses and embedded Codex have been producing the same trace across default,
"metadata"and"content"settings in the new parity tests.responsespan per logical Responses or Codex call, including backoff. Onegenerationfor a Chat Completions call.chatspan withopenai.agents.model.retryevents and anopenai.agents.model.attemptattribute.functionspan with apausedorrejectedoutcome. A separate span at execution after approval.operation_detailfor payload selection only. Existing SDK-visible fields by default, OTel metadata by default, bounded payloads with"content". Capture veto viatrace_include_sensitive_data=False.The Codex tracing patch has been exposing the submitted input, transport outcome and start of authorized tool execution. 68 added and 7 removed Core lines in total, 12 net lines beyond #6106. The SDK binding has been limiting copies at the source. Python has been grouping attempts, creating spans and exporting events. Upstreaming and removal guide
Compatibility
Consumers counting attempts have been able to use
span.span_data.operation.retry_timestamps. The SDK has been keeping up to 128 retry observations per call. Retries reported together have been sharing one timestamp. Query change for detailed Responses and Codex spans fromgenerationtoresponse.Test plan
Checks
.agents/skills/code-change-verification/scripts/run.sh