Skip to content

🤖 refactor: scope ask_user_question to genuinely open decisions#3412

Merged
ammario merged 1 commit into
mainfrom
ask-user-question-ytb9
May 28, 2026
Merged

🤖 refactor: scope ask_user_question to genuinely open decisions#3412
ammario merged 1 commit into
mainfrom
ask-user-question-ytb9

Conversation

@ammar-agent

Copy link
Copy Markdown
Collaborator

Summary

Tightens guidance for the ask_user_question tool 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_question was 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:

  • Tool description (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.
  • Plan-mode prompt (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 for ask_user_question on 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 (from plan.md)
  • docs/agents/index.mdx (from plan.md)
  • builtInSkillContent.generated.ts (mux-docs offline snapshot embedding the docs)

Validation

  • bun scripts/gen_docs.ts check — generated artifacts in sync
  • make static-check — passed

No 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

@ammar-agent

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

ℹ️ 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".

@mintlify

mintlify Bot commented May 28, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Mux 🟢 Ready View Preview May 28, 2026, 7:29 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@ammario ammario merged commit bb279db into main May 28, 2026
24 checks passed
@ammario ammario deleted the ask-user-question-ytb9 branch May 28, 2026 19:37
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.

2 participants