[BUG] AskUserQuestion preview: 'n'+Enter drops highlighted option, ships only the note

Status Open
Reported on v2.1.121
Maintainer reply None cached
Activity 5 comments · opened Jun 6, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

When AskUserQuestion is invoked with at least one option whose preview field is set, the UI switches to side-by-side layout (option list on the left, preview pane on the right) and exposes an "add note" affordance on every option (the n keybinding). Pressing n on a highlighted option opens note-editing mode. Typing a note and pressing Enter once submits the entire response as (no option selected) notes: <text>.

The typed note text is preserved, but the highlighted option — and with it the binding indicating which option the note belongs to — is dropped.

Plain AskUserQuestion invocations (where no option has a preview field) are not affected.

What Should Happen?

The flow should be a clean two-step interaction:

  1. Arrow to highlight an option.
  2. Press n → note-editing mode opens.
  3. Type the note.
  4. Press Enter → exits note mode; the note is saved bound to the highlighted option; the user is returned to option-navigation mode and can still arrow to change selection or revise notes on other options.
  5. Press Enter again (option highlighted, not in note mode) → submits the response: <highlighted option> + note.

Current behavior collapses steps 4 and 5 into a single Enter that submits with the option dropped.

Error Messages/Logs

(no option selected) notes: Press `n`, typed these, then hitting `Enter` once..

Steps to Reproduce

  1. Trigger an AskUserQuestion with 2–4 single-select options, at least one of which has a preview field set (the side-by-side layout kicks in for the whole question as soon as any one option has a preview).
  2. Arrow to highlight any option.
  3. Press n → type any text → Enter.
  4. Observe the response payload: (no option selected) notes: <text> — the highlighted option is dropped and only the note survives.

Originally reproduced 4× on 2.1.121 in both default and fullscreen TUI renderers (/tui default and /tui fullscreen). Re-confirmed live on 2.1.156 and again on 2.1.167.

Claude Model

Opus — Claude Opus 4.8 (claude-opus-4-8, 1M context)

Is this a regression?

Yes, this worked in a previous version.

Last Working Version

Around 2.1.119 or earlier (exact build uncertain).

Claude Code Version

2.1.167 (Claude Code)

Platform

Anthropic API

Operating System

macOS 26.3.1 (Darwin 25.3.0, arm64)

Terminal/Shell

VS Code integrated terminal (1.122.1), zsh

Additional Information

Cross-reference anthropics/claude-code#57005 (the feature request for the proper Tab/Space-to-comment-on-selected-option flow). This bug is about the existing n affordance becoming incoherent on preview-enabled questions, not the missing feature.

View original on GitHub ↗

3 Comments

lud-wj · 2 months ago

I have the exact same problem. This is very annoying. Here is another Claude report

Title: AskUserQuestion notes are delivered to the model detached from the option they were attached to

Environment:

  • Claude Code v2.1.197
  • Model: Opus 4.8

Summary:
When answering an AskUserQuestion prompt that has option previews (the aside/code-excerpt UI), notes added via "press n to add notes" are delivered to the model as free-standing text with no association to the option they were entered under. In the two note cases I tested, the answer was also reported as (no option selected) even though the note was visually entered inside a specific option's card.

Steps to reproduce:

  1. Have Claude ask a question via AskUserQuestion where each option includes a preview (this triggers the side-by-side UI with previews and the "press n to add notes" affordance).
  2. Focus one option, press n, and type a note without toggling/selecting that option.
  3. Submit.

Expected:
The model receives both the selected option (or at minimum the option the note is attached to) and the note, so it knows which choice the note refers to.

Actual:
The model receives only the raw note text plus an explicit (no option selected) marker. The option under which the note was typed is not communicated. From the model side there is no way to tell which option a note belongs to — the only reason it "knew" in my test was because I happened to type the option name into the note text myself.

Example of what the model received:

"Which caching strategy...?" = (no option selected) notes: this is a note inside "3. ETS table", but I can't toggle the choice, so I guess you will only see this.

Additional observation:
It appears you cannot both add a note to an option and select that option — entering a note does not select the option, and there was no obvious way to toggle the selection while adding the note. So the two pieces of information (choice + note) can't currently be sent together for a single option.

Contrast — the working case:
Selecting an option without a note works correctly. The model receives the option label plus its preview text, unambiguously:

"Where should the default question sets be defined?" = "In config" selected preview: config :aitx_cfa, :question_sets, [...]

Impact:
Notes attached to an option are effectively orphaned. The model loses the option↔note association and, in the note-only case, gets (no option selected), so it cannot act on the user's intent reliably.

h2suzuki · 1 month ago

Still reproduces on v2.1.199 (WSL2 Ubuntu 24.04, Windows Terminal).

An AskUserQuestion call with two questions, both using preview fields on their options: the user highlighted an option and attached a note on each question, and the tool result came back as

"<question>"=(no option selected) notes: <user's note>

for both questions — the highlighted selections were dropped and only the notes survived. Matches the originally reported symptom string exactly.

mckernanin · 18 days ago

Still reproduces on v2.1.228 (WSL2, Linux 6.18, zsh).

One correction to the original report: this is not limited to questions with preview set. The bug is in the shared submit path and is preview-independent. From the 2.1.228 bundle, the question component's submit callback is:

const V = useCallback(() => {
  X();                                  // close note editor
  if ($) l(w, $);                       // $ = questionState.selectedValue
  else if (D.trim()) l(w, PVo);         // D = textInputValue, PVo = "(notes only)"
}, [X, $, D, w, l]);

and the key handler:

else if (ce.key === "return") ce.preventDefault(), j(C);   // select + submit
else if (ce.key === "n" && !ce.ctrl && !ce.meta) ce.preventDefault(), y(!0), c(!0);  // open note editor

Only j() writes selectedValue:

const j = useCallback((ce) => {
  const le = k[ce]; if (!le) return;
  R(ce); a(w, { selectedValue: le.label }, !1); l(w, le.label);
}, [k, w, a, l]);

Arrow keys and the number keys 1-9 route to q(), which only moves the highlight index — it never calls j(). So highlighting an option and pressing n leaves selectedValue unset, and the submit falls through to the (notes only) branch. Nothing in that path reads preview; preview only changes layout. I hit this on preview-less questions routinely.

Workaround for anyone blocked: after typing the note press Escape instead of Enter. That closes the editor without submitting (the note text stays in textInputValue), and a subsequent Enter on the highlighted option calls j(), so both the label and the note ship.

Showing cached comments. Read the full discussion on GitHub ↗