Skip to content

Revert "fix(studio): gate external tool nudges and preserve retry context" - #9990

Merged
danielhanchen merged 1 commit into
mainfrom
revert-9125-fix/8907-external-tool-nudge
Aug 30, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
revert-9125-fix/8907-external-tool-nudge

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Reverts #9125

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-30T02:34:15.701247Z 995dde0 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen
danielhanchen merged commit e7de2ed into main Aug 30, 2026
74 of 86 checks passed
@danielhanchen
danielhanchen deleted the revert-9125-fix/8907-external-tool-nudge branch August 30, 2026 02:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +1051 to +1052
and is_short_intent_without_action(visible_answer)
and not is_reprompt_repeat(visible_answer, last_reprompt_text)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment on lines +2389 to +2391
"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."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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