🤖 refactor: scope ask_user_question to genuinely open decisions#3412
Merged
Conversation
Collaborator
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
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.
Summary
Tightens guidance for the
ask_user_questiontool so it is reserved for genuinely balanced decisions, not used as a confirmation step when the agent already has a recommended answer.Background
ask_user_questionwas being invoked too aggressively — it would surface choices even when the agent already had a clear recommendation. If the agent has a recommended option, asking the question defeats its purpose: it should just proceed (stating the assumption) and reserve the tool for decisions that actually require user-specific context the agent cannot derive itself.Implementation
Updated the two sources of truth and regenerated all derived artifacts:
src/common/utils/tools/toolDefinitions.ts): replaced the old"MUST be used when you need user clarification"framing with explicit gating — use only for genuinely balanced decisions hinging on user-specific context/preference/info; do not use when a reasonable recommendation already exists; keep options genuinely open rather than steering toward a "recommended" choice.src/node/builtinAgents/plan.md): the agent now resolves uncertainty itself when it has a reasonable default/recommendation (adopt + note the assumption), and only reaches forask_user_questionon genuinely open decisions.The tool is already removed from exec/desktop agents, so it is effectively plan-mode-only.
Regenerated (auto-generated, kept in sync):
builtInAgentContent.generated.ts(fromplan.md)docs/agents/index.mdx(fromplan.md)builtInSkillContent.generated.ts(mux-docs offline snapshot embedding the docs)Validation
bun scripts/gen_docs.ts check— generated artifacts in syncmake static-check— passedNo tests were added: the change is prose-only and any assertion on the wording would be tautological.
Generated with
mux• Model:anthropic:claude-opus-4-8• Thinking:xhigh• Cost:$1.80