AskUserQuestion: note field does not soft-wrap at terminal width
Description
When answering an AskUserQuestion prompt, the free-text note field attached to an
option does not soft-wrap at the terminal width. Typing past the right edge continues on
the same visual line instead of wrapping, so the only way to enter more than one line's
worth of text is to insert newlines manually.
This makes the note field impractical for anything longer than a short phrase, which is a
problem for workflows that ask the user to make a selection and explain the reasoning
behind it in the same interaction — the selection is cheap, the explanation is where the
actual content is.
Steps to reproduce
- Have an agent call
AskUserQuestionwith a single-select question whose options carry
preview values (this is what surfaces the note field).
- Select an option.
- In the note field, type a sentence longer than the terminal width.
Expected
The note text soft-wraps at the terminal width and continues on the next visual line, as
it does in the main prompt input.
Actual
Text does not wrap at the right edge. Manual newlines are required to keep typed input
visible.
Environment
- Claude Code 2.1.220
- macOS 26.5.2 (Darwin 25.5.0)
TERM=xterm-256color, default terminal width (COLUMNSunset / reported as 0 in a
non-interactive subshell)
Note
Observed repeatedly across a single long session with roughly a dozen AskUserQuestion
prompts, so it does not appear to be intermittent.