You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Clicking a question option discards text typed into the composer #12569
While an agent is running, a structured question (single-choice options plus an editable answer field) takes over the composer. If I type into the composer while that question is active and then click one of the options, the text I typed is discarded immediately. Nothing brings it back: it is not in the thread draft, not in the answer, not in the message sent to the agent.
Steps to reproduce
Start a Claude Code task (desktop app, Windows) and wait for the agent to work.
Start typing a follow-up in the composer.
The agent issues an AskUserQuestion-style question with several options.
Type (or continue typing) some text into the composer. With the question active, the composer edits the question's custom answer.
Click one of the options.
Expected behavior
Choosing an option must not destroy text the user has typed. Either the text stays visible (as clarification or as the pending follow-up message), or it moves back to the thread draft. The user decides what to do with it.
Actual behavior
The composer is emptied the moment an option is clicked. The typed text is gone with no recovery path.
Source
Confirmed from source at dfbb11bdd7c3f1a5575cb55d3e3abb12be025727 (main), same code as the installed build.
Selecting an option rebuilds the draft answer with customAnswer: "", so any text typed into the answer field is dropped by design:
The behaviour dates back to the original user-input implementation (12edc3455) and is covered by unit tests as intended (togglePendingUserInputOptionSelection returns customAnswer: ""). The design reason is that a non-empty custom answer takes precedence over selected options in resolvePendingUserInputAnswer, so the two are treated as mutually exclusive. That makes sense for the answer model, but it turns a click into silent data loss for text the user was composing.
Relation to existing issues
[Bug]: Incoming agent questions replace an unfinished message and redirect subsequent typing #11116 (accepted) covers the wider takeover: the composer switches to the question answer and Send routes to the question. This report is the destructive sub-case: even under the current takeover model, clicking an option should not delete typed text. A small fix is possible without the redesign (for example, move a non-empty custom answer back into the thread draft when an option is selected, instead of discarding it).
[BUG] Textarea being reset #808 (closed) reported the reset when the question appears; that text is preserved in the thread draft. This case is different: the text is lost.
Impact
Major degradation or frequent failure. Typing while the agent works is normal use, and a single click deletes the message.
Version or commit
Installed desktop build 0.0.42 (t3codeCommitHash719a76ca1dbf). Source checked at dfbb11bdd.
Environment
Windows 11 Home 10.0.26200, T3 Code desktop (Alpha), provider Claude Code.
Workaround
Do not type while a question is active, or press Send with the typed text as the custom answer instead of clicking an option.
lovely composed in pair with Claude Fable 5.1 in Claude Code
Area
apps/web (shared desktop composer)
Summary
While an agent is running, a structured question (single-choice options plus an editable answer field) takes over the composer. If I type into the composer while that question is active and then click one of the options, the text I typed is discarded immediately. Nothing brings it back: it is not in the thread draft, not in the answer, not in the message sent to the agent.
Steps to reproduce
AskUserQuestion-style question with several options.Expected behavior
Choosing an option must not destroy text the user has typed. Either the text stays visible (as clarification or as the pending follow-up message), or it moves back to the thread draft. The user decides what to do with it.
Actual behavior
The composer is emptied the moment an option is clicked. The typed text is gone with no recovery path.
Source
Confirmed from source at
dfbb11bdd7c3f1a5575cb55d3e3abb12be025727(main), same code as the installed build.customAnswer: "", so any text typed into the answer field is dropped by design:t3code/apps/web/src/pendingUserInput.ts
Lines 96 to 106 in dfbb11b
ChatViewalso resets the shared prompt ref to an empty string:t3code/apps/web/src/components/ChatView.tsx
Line 8835 in dfbb11b
activePendingProgress.customAnswerwhile a question is active, so the emptied answer is what the user sees:t3code/apps/web/src/components/chat/ChatComposer.tsx
Lines 6806 to 6811 in dfbb11b
The behaviour dates back to the original user-input implementation (
12edc3455) and is covered by unit tests as intended (togglePendingUserInputOptionSelectionreturnscustomAnswer: ""). The design reason is that a non-empty custom answer takes precedence over selected options inresolvePendingUserInputAnswer, so the two are treated as mutually exclusive. That makes sense for the answer model, but it turns a click into silent data loss for text the user was composing.Relation to existing issues
Impact
Major degradation or frequent failure. Typing while the agent works is normal use, and a single click deletes the message.
Version or commit
Installed desktop build 0.0.42 (
t3codeCommitHash719a76ca1dbf). Source checked atdfbb11bdd.Environment
Windows 11 Home 10.0.26200, T3 Code desktop (Alpha), provider Claude Code.
Workaround
Do not type while a question is active, or press Send with the typed text as the custom answer instead of clicking an option.
lovely composed in pair with Claude Fable 5.1 in Claude Code