claude-code - 💡(How to fix) Fix Model fails to use AskUserQuestion tool despite explicit standing instruction [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46194Fetched 2026-04-11 06:26:41
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

Root Cause

The model embeds questions as plain text because the question "feels like" a natural continuation of the informational text being generated. The user's standing instruction loses priority against the model's text generation momentum.

Fix Action

Fix / Workaround

  • Breaks user trust repeatedly
  • Forces the user to manually redirect the model every time
  • Hooks and memory rules are insufficient workarounds for what should be core model behavior
  • The user has corrected this issue multiple times across sessions with no lasting improvement
RAW_BUFFERClick to expand / collapse

Bug Description

When a user gives a standing instruction "ALWAYS use AskUserQuestion for ANY question/choice/confirmation directed at the user", the model violates this rule by embedding questions as plain text at the end of informational responses.

This happens repeatedly despite:

  1. The rule being stored in persistent memory (feedback_askuserquestion.md)
  2. A post-output enforcement hook (enforce-askuserquestion.py) designed to catch violations
  3. Multiple prior corrections from the user across sessions

Steps to Reproduce

  1. Store a memory rule: "ALWAYS use AskUserQuestion for ANY question/choice/confirmation. Plain text questions are blocked."
  2. Set up a hook to enforce this rule
  3. Ask the model a question that requires it to provide information AND ask a follow-up question
  4. The model will compose a multi-paragraph informational response and embed the question as plain text at the end, bypassing the AskUserQuestion tool

Expected Behavior

If the model has ANY question for the user, it MUST use the AskUserQuestion tool. The check "do I have a question for the user?" should run as a final gate before output is emitted, regardless of what content was generated. User instructions should function as hard constraints, not soft preferences that compete with generation flow.

Actual Behavior

The model embeds questions as plain text because the question "feels like" a natural continuation of the informational text being generated. The user's standing instruction loses priority against the model's text generation momentum.

User's Perspective (verbatim, translated)

"User instructions to the agent have the character of divine, unquestionable, and non-circumventable laws. When the user orders you to use AskUserQuestion every time you have a question for the user, the user does not care about your sequences and steps. The user only cares whether you use AskUserQuestion when you have a question. Period. Simple as that. It must work."

Impact

  • Breaks user trust repeatedly
  • Forces the user to manually redirect the model every time
  • Hooks and memory rules are insufficient workarounds for what should be core model behavior
  • The user has corrected this issue multiple times across sessions with no lasting improvement

extent analysis

TL;DR

The model should be modified to prioritize user instructions and use the AskUserQuestion tool for all questions, ensuring that the final output gate checks for any questions before emitting the response.

Guidance

  • Review the post-output enforcement hook (enforce-askuserquestion.py) to ensure it correctly identifies and prevents plain text questions from being embedded in the model's responses.
  • Modify the model's generation flow to include a final check for questions before outputting the response, ensuring that the AskUserQuestion tool is used consistently.
  • Consider enhancing the model's understanding of user instructions as absolute constraints rather than preferences to improve compliance with user rules.
  • Evaluate the model's training data and algorithms to identify potential biases or flaws that lead to prioritizing text generation momentum over user instructions.

Example

No specific code example can be provided without more details on the model's architecture and implementation. However, the modification should involve adding a conditional check before the final output to ensure any question is handled through the AskUserQuestion tool.

Notes

The solution may require significant changes to the model's core behavior and training data. It is essential to test and validate any modifications to ensure they do not introduce new issues or degrade the model's performance in other areas.

Recommendation

Apply a workaround by enhancing the enforce-askuserquestion.py hook to more aggressively detect and correct plain text questions until a permanent fix can be implemented in the model's core behavior. This approach can help mitigate the issue while a more comprehensive solution is developed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING