Repository navigation
Revert "fix(studio): gate external tool nudges and preserve retry context" - #9990
Conversation
Codex Review SummaryThis 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 995dde0f56
ℹ️ 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".
| # The retry must see the assistant turn it is being asked to | ||
| # continue from. Without this, plain prose stalls are replayed | ||
| # as user -> user and the provider answers from scratch. | ||
| if stalled_hosted: |
There was a problem hiding this comment.
Replay plain assistant stalls before sending the nudge
When a plan-only stall has no provider-hosted tool result—the normal case—stalled_hosted is empty, so the assistant turn is not appended before _append_user_turn adds or merges the nudge into the original user message. The retry therefore cannot see the assistant text it is being asked to continue, even though that text was already streamed to the client; with continue_final_message, the newly generated partial also disappears from the accumulated assistant context. Replay the sanitized visible stall for every nudge, not only hosted-tool stalls.
Useful? React with 👍 / 👎.
| and is_short_intent_without_action(visible_answer) | ||
| and not is_reprompt_repeat(visible_answer, last_reprompt_text) |
There was a problem hiding this comment.
Strip tool markup before classifying a stall
For a transport without text healing, such as Codex, or for an unpromotable/disabled text-form call, visible_answer still contains the literal tool-call payload. An intent phrase such as I will search now inside its JSON arguments satisfies this predicate even though the model emitted no replayable assistant promise and no executable call, causing an unnecessary additional provider request whenever nudging is enabled. Classify the markup-stripped replay text instead of the raw streamed payload.
Useful? React with 👍 / 👎.
| "On the non-streaming client-tool passthrough, retry once with a short " | ||
| "nudge when the model emitted a tool signal that healing could not repair. " | ||
| "Default: on. No effect on streaming requests or the server-side agentic loop." |
There was a problem hiding this comment.
Document the streaming agent-loop effect of nudging
For streaming external-tool requests that omit nudge_tool_calls, this option sets UNSLOTH_TOOL_CALL_NUDGE, nudge_enabled(None) reads that process default, and stream_with_studio_tools uses it for plan-without-action retries. Thus the claim that the flag has no effect on streaming requests or the server-side agentic loop is false and can mislead operators about hidden retries and provider usage.
Useful? React with 👍 / 👎.
Reverts #9125