fix(agent): stop bypassing ask tool in YOLO mode#3709
Closed
CVEngineer66 wants to merge 2 commits into
Closed
Conversation
The ask tool is meant to get a user decision, but Controller.Ask() checked bypassEnabled() and returned a fake answer (first option) without prompting the user. YOLO mode should only skip tool-approval gates, not the ask tool. Removed the two bypassEnabled() checks from Ask() and the now-unused recommendedAskAnswers() helper. Fixes esengine#3696
Owner
|
Thanks @CVEngineer66 — your minimal controller.go fix is exactly right and is the basis of #3712. Closing in favor of that, which also updates the existing yolo_test.go cases that asserted the old auto-answer behavior (those were why CI went red here). Credited via Co-authored-by. Closes the same #3624. |
esengine
added a commit
that referenced
this pull request
Jun 9, 2026
) * fix(control): don't auto-answer the ask tool in YOLO mode Controller.Ask checked bypassEnabled() and silently returned the first option of every question, so in YOLO mode the `ask` tool got a fake answer and the user never saw the prompt. Bypass is meant to skip tool-approval gates, not to answer the user's genuine questions. Remove both bypass checks (and the now unused recommendedAskAnswers helper); Ask always emits an AskRequest and waits for AnswerQuestion, even under bypass. Combines the minimal fix from #3709 (CVEngineer66) with the behavior tests from #3638 (warvyvr), dropping that PR's unrelated files. Closes #3624 Co-authored-by: CVEngineer66 <CVEngineer66@users.noreply.github.com> Co-authored-by: warvyvr <warvyvr@users.noreply.github.com> * fix(control): drop now-unused bypassEnabled helper Removing the bypass checks from Ask left bypassEnabled with no callers (staticcheck unused). --------- Co-authored-by: reasonix <reasonix@deepseek.com> Co-authored-by: CVEngineer66 <CVEngineer66@users.noreply.github.com> Co-authored-by: warvyvr <warvyvr@users.noreply.github.com>
SuMuxi66
pushed a commit
to SuMuxi66/DeepSeek-Reasonix
that referenced
this pull request
Jun 10, 2026
) (esengine#3712) * fix(control): don't auto-answer the ask tool in YOLO mode Controller.Ask checked bypassEnabled() and silently returned the first option of every question, so in YOLO mode the `ask` tool got a fake answer and the user never saw the prompt. Bypass is meant to skip tool-approval gates, not to answer the user's genuine questions. Remove both bypass checks (and the now unused recommendedAskAnswers helper); Ask always emits an AskRequest and waits for AnswerQuestion, even under bypass. Combines the minimal fix from esengine#3709 (CVEngineer66) with the behavior tests from esengine#3638 (warvyvr), dropping that PR's unrelated files. Closes esengine#3624 Co-authored-by: CVEngineer66 <CVEngineer66@users.noreply.github.com> Co-authored-by: warvyvr <warvyvr@users.noreply.github.com> * fix(control): drop now-unused bypassEnabled helper Removing the bypass checks from Ask left bypassEnabled with no callers (staticcheck unused). --------- Co-authored-by: reasonix <reasonix@deepseek.com> Co-authored-by: CVEngineer66 <CVEngineer66@users.noreply.github.com> Co-authored-by: warvyvr <warvyvr@users.noreply.github.com>
dorokuma
pushed a commit
to dorokuma/DeepSeek-Reasonix
that referenced
this pull request
Jun 10, 2026
) (esengine#3712) * fix(control): don't auto-answer the ask tool in YOLO mode Controller.Ask checked bypassEnabled() and silently returned the first option of every question, so in YOLO mode the `ask` tool got a fake answer and the user never saw the prompt. Bypass is meant to skip tool-approval gates, not to answer the user's genuine questions. Remove both bypass checks (and the now unused recommendedAskAnswers helper); Ask always emits an AskRequest and waits for AnswerQuestion, even under bypass. Combines the minimal fix from esengine#3709 (CVEngineer66) with the behavior tests from esengine#3638 (warvyvr), dropping that PR's unrelated files. Closes esengine#3624 Co-authored-by: CVEngineer66 <CVEngineer66@users.noreply.github.com> Co-authored-by: warvyvr <warvyvr@users.noreply.github.com> * fix(control): drop now-unused bypassEnabled helper Removing the bypass checks from Ask left bypassEnabled with no callers (staticcheck unused). --------- Co-authored-by: reasonix <reasonix@deepseek.com> Co-authored-by: CVEngineer66 <CVEngineer66@users.noreply.github.com> Co-authored-by: warvyvr <warvyvr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
In YOLO mode, when the agent calls the
asktool to get a user decision, no prompt UI appears and the agent receives a fake answer (the first option is automatically selected). This defeats the purpose of theasktool, which exists specifically for cases where the model needs genuine user input.Root Cause
Controller.Ask()(which implementsagent.Asker) checkedbypassEnabled()before emitting theAskRequestevent:The same check appeared twice — once before
promptMu.Lock()and once after — both returningrecommendedAskAnswers()which always selectsq.Options[0].Label.Logic Error
YOLO mode (
c.bypass = true) was designed to skip tool-approval gates (therequestApproval()method), allowing autonomous execution without manual approval of each tool call. Theasktool is semantically different:requestApproval)asktool (user decision)The
asktool exists precisely for cases where the model cannot decide on its own — treating it the same as a tool approval gate undermines its purpose.Fix
Removed both
bypassEnabled()checks fromController.Ask(), so theasktool always emits anAskRequestevent and waits for the user to respond, regardless of mode.Also removed the now-unused
recommendedAskAnswers()helper function.Testing
go build ./internal/...— cleango test ./internal/agent/ -run TestAsk— all 4 ask tool tests passFixes #3696