Claude Code's 4-Option Limit in AskUserQuestion Silently Dropped an Abort Button
A developer building an AI orchestrator called Suhail repeatedly triggered a validation error because Claude Code's AskUserQuestion tool enforces a hard cap of four options per question. The bug surfaced three times across separate sessions, each time wasting a turn as the model hit a schema rejection instead of presenting its menu. More critically, when the menu silently exceeded the cap without erroring, the model dropped the Abort option entirely, leaving users with no way to halt a run. The root cause was traced to hardcoded option lists in markdown prompt template files, not to any dynamic code logic. The fix involved splitting oversized menus across two questions per call and embedding the four-option rule directly into every prompt template to prevent future violations.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in