Skip to content

Improve goal completion usage reporting#22907

Merged
etraut-openai merged 1 commit into
mainfrom
etraut/goal-completion-usage-copy
May 16, 2026
Merged

Improve goal completion usage reporting#22907
etraut-openai merged 1 commit into
mainfrom
etraut/goal-completion-usage-copy

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented May 15, 2026

Why

Goal completion follow-up turns currently receive a preformatted English usage sentence such as time used: 2586 seconds. That nudges the model to echo an awkward raw seconds count in the final reply, even though the tool result already exposes structured usage fields like goal.timeUsedSeconds, goal.tokensUsed, and goal.tokenBudget.

What changed

  • Replace the preformatted completion usage sentence with guidance to read the structured goal fields from the tool result.
  • Preserve token-budget reporting while allowing the model to phrase elapsed time in a concise, human-friendly way that fits the response language.
  • Update core coverage for both the generated completion guidance and the session flow that forwards it back to the model.

Verification

Previously, it would have output a final message indicating that it "worked for 303 seconds". Now it shows the following:

image

@etraut-openai etraut-openai changed the title [codex] Localize goal completion usage reporting Localize goal completion usage reporting May 15, 2026
@etraut-openai etraut-openai changed the title Localize goal completion usage reporting Improve goal completion usage reporting May 15, 2026
@etraut-openai etraut-openai marked this pull request as ready for review May 15, 2026 21:52
@etraut-openai etraut-openai requested a review from a team as a code owner May 15, 2026 21:52
Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Approved.

@etraut-openai etraut-openai merged commit 941e7f8 into main May 16, 2026
31 checks passed
@etraut-openai etraut-openai deleted the etraut/goal-completion-usage-copy branch May 16, 2026 18:49
@github-actions github-actions Bot locked and limited conversation to collaborators May 16, 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