Skip to content

fix(control): don't auto-answer the ask tool in YOLO mode (#3624)#3712

Merged
esengine merged 2 commits into
main-v2from
fix/3624-yolo-ask
Jun 9, 2026
Merged

fix(control): don't auto-answer the ask tool in YOLO mode (#3624)#3712
esengine merged 2 commits into
main-v2from
fix/3624-yolo-ask

Conversation

@esengine

@esengine esengine commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Bug (#3624)

In YOLO/bypass mode, when the agent calls the ask tool to get a user decision, no prompt appears and the agent silently receives the first option. Bypass is meant to skip tool-approval gates, not to answer the user's genuine questions — so ask was being defeated.

Fix

Controller.Ask removed both bypassEnabled() short-circuits (and the now-unused recommendedAskAnswers helper). Ask always emits an AskRequest and waits for AnswerQuestion, even under bypass.

Provenance — combining the two open PRs for this issue

Two PRs targeted #3624; neither was mergeable alone:

This PR takes #3709's clean fix and #3638's behavior tests (TestBypassDoesNotAutoAnswerAsk, TestAskSerializesBehindPromptLockEvenWithBypass), dropping the stray files. Credit to both authors via Co-authored-by.

Test plan

  • go test ./internal/control green; both new tests pass; gofmt/vet clean.

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>
@esengine esengine requested a review from SivanCola as a code owner June 9, 2026 13:13
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development agent Core agent loop (internal/agent, internal/control) labels Jun 9, 2026
Removing the bypass checks from Ask left bypassEnabled with no callers
(staticcheck unused).
@esengine esengine merged commit f3d9ef3 into main-v2 Jun 9, 2026
13 checks passed
@esengine esengine deleted the fix/3624-yolo-ask branch June 9, 2026 13:22
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant