Skip to content

Investigate: AskUserQuestion-equivalent Q&A pattern for PAI (not just Claude Code) #143

@virtualian

Description

@virtualian

Context

Claude Code ships a built-in AskUserQuestion tool that renders discrete multi-option choices to the user. It's harness-level — not something a hook can force. Two mechanisms exist today in CC:

  1. Behavioral default via memory / CLAUDE.md — a rule like "when facing discrete multi-option decisions, use AskUserQuestion" gets loaded every session, making it the default.
  2. Hooks — shell commands the harness runs on events (tool calls, Stop, etc.). Hooks cannot force the model to select a specific tool, so they're the wrong mechanism for this.

So in CC: behavior → memory, automation → hooks.

Problem

PAI is multi-harness (primary DA + subagents, plus whatever non-CC surfaces PAI targets). The CC-specific AskUserQuestion tool is not portable. We need a PAI-native pattern so that:

  • Structured multi-choice Q&A is available across all PAI modes (NATIVE, ALGORITHM) and subagents, not just the CC primary agent.
  • Triggering is consistent — the DA reaches for it automatically for discrete-option decisions, without per-session reminders.
  • The rendering/response contract is defined (options, free-text escape, cancel) regardless of the underlying harness.

Investigation scope

  • Inventory where discrete-option Q&A would improve PAI flows (Algorithm phases, issue triage, branch/commit confirmations, skill routing).
  • Decide: wrap CC's AskUserQuestion behind a PAI-level contract, or define an independent PAI primitive that CC's tool is one implementation of.
  • Determine how to trigger it automatically — behavioral rule in PAI/CLAUDE.md / mode headers, or an Algorithm step ("ENUMERATE → OFFER") that formalises the choice point.
  • Subagent story: can subagents invoke it, or must they surface choices back to the primary DA?
  • Non-CC harness fallback (text-only prompt vs structured tool call).

Out of scope

  • Implementation. This issue is investigation only; propose the design, then spin out an implementation issue.

Related

  • CC's AskUserQuestion is harness-provided, not hook-triggerable (confirmed in current session).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions