Repository navigation
Answer wrapping AskUserQuestion options (truncated-label match) - #599
Merged
Merged
Conversation
Points at the fix for answering a wrapping AskUserQuestion option, which failed because the screen label is a truncated prefix of the full semantic label. Renderer/driver code in agent-code is unchanged — the fix is entirely in the driver's option matching. Submodule PR: Juliusolsson05/claude-code-headless#47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pointer bump for claude-code-headless#47.
The bug
Answering an AskUserQuestion option whose label wraps did nothing —
option-not-found, zero keystrokes, picker left up. Reproduced end-to-end against a live claude picker:The TUI keeps only the first physical line of a wrapping label; the answer payload carries the full semantic label. Exact equality can never match. Verified live that the wrapped continuation and the option's description share the same fg colour, so the parser genuinely cannot rejoin it — the fix lives in matching, not parsing.
Scope
optionBySelection): truncation-tolerant prefix containment instead of exact equality, number check unchanged so ambiguous/stale labels still fail closed.History
This supersedes the reverted AUQ changes from #598, which review proved wrong against a live picker (parser-side label rejoin was a regression; two driver fallbacks answered the wrong question). This version was built live-first and does none of those.
🤖 Generated with Claude Code