Feature request: enforce structured question events when an assistant turn requires user action (buried-ask invariant)

Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 18, 2026

Feature request

A native invariant: when an assistant turn ends by requiring user action — a question, a choice, an approval — the turn should carry a structured question event (e.g. the AskUserQuestion tool / interactive picker), with the UI promoting it to an actionable control. Turns that ask in prose but emit no structured event would ideally be rejected or flagged by the harness itself.

Problem

Across long agentic sessions, models repeatedly end turns with the actionable item buried in prose — "it stays parked until you say the word", "execute the window now?" — instead of raising the interactive question control. The human then has to notice the ask inside a wall of summary text. In our experience this recurs even after repeated explicit instruction (documented ~7 separate corrections in standing instructions), including the model apologizing for burying an ask and then re-asking… in prose again, seconds later. Instruction alone does not fix it; it is a structural gap.

What we built as a workaround (and why it shouldn't be user homework)

A Stop-event hook that inspects the final assistant paragraph for ask-shaped prose (terminal question, "say the word", "awaiting your approval", etc.), and when no structured question event occurred after it in the turn, blocks the stop once with guidance to raise the interactive question or restate declaratively. Pattern heuristics + fail-open + a one-continuation cap make it safe, but it is regex archaeology over transcripts — the harness knows natively whether a structured ask was emitted and could enforce this invariant far more cleanly.

Suggested shape

  • Detection: model classifier or harness heuristic that a terminal message requests user action.
  • Enforcement: soft (auto-promote to the question UI / badge the turn "action requested") or strict (reject the stop and instruct the model to emit the structured event), ideally configurable.
  • Scope: any surface with an interactive question affordance (CLI picker, desktop popup).

Environment

Claude Code for Windows desktop app (also applies to CLI), current as of 2026-07-18.

View original on GitHub ↗