[Bug]: Typed answer to an agent question disappears after switching to another existing thread
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/web
Steps to reproduce
- Open an existing thread and have the agent ask a structured question with a custom text answer allowed.
- Type an answer in the question composer without submitting it. The attached example uses the question 'Do you prefer dark mode?' and the text 'Hello this is a test if I this text is remembered.'
- Briefly select another existing conversation in the sidebar.
- Return to the original conversation.
- The question is still waiting, but the typed answer is gone.
This is the user's observed reproduction, supported by the attached before/after screenshots. It was not independently replayed during this investigation.
Expected behavior
The unsent custom answer should still be present when returning to the original conversation. Switching conversations should preserve a question-answer draft, just as it preserves an ordinary message draft.
Actual behavior
The question remains visible, but the custom answer becomes empty and the placeholder returns. There is no warning; a long answer must be rewritten. The user encounters this occasionally when accidentally switching conversations.
Related report and proposed fix
- #13856 reports typed question answers lost after opening New thread (Claude Code). This report records switching to another existing conversation, with GPT-6.1-Sol selected. It may share the same underlying cause; please cross-link or consolidate if appropriate.
- #13865 proposes preserving question-answer state across navigation and was still open/unmerged when checked on 2026-10-11.
Source inspection (not a live nightly reproduction)
At latest published nightly commit ed0f7b908b2e7b3a22e6fd82a73794c2fe6ee06e, pendingUserInputAnswersByRequestId and pendingUserInputQuestionIndexByRequestId still use local React state in ChatView.tsx (lines 1930-1934), rather than the persistent composer draft store. This supports answer loss if ChatView remounts, but does not establish which remount/navigation path occurred in this user's existing-thread switch. https://github.com/pingdotgg/t3code/blob/ed0f7b908b2e7b3a22e6fd82a73794c2fe6ee06e/apps/web/src/components/ChatView.tsx#L1930-L1934
Impact
Minor bug or occasional failure
Version or commit
Exact affected installed build not captured. Latest nightly source checked: 0.0.46-nightly.20261011.2980, commit ed0f7b908b2e7b3a22e6fd82a73794c2fe6ee06e. This version was inspected from source, not independently tested in the running app.
Environment
T3 Code question composer; GPT-6.1-Sol, Extra High, Full access shown in the screenshots. Reporting machine: Windows. Exact affected desktop/browser version not captured.
Logs or stack traces
No error or stack trace supplied. The answer disappears silently.
Screenshots, recordings, or supporting files
codex-clipboard-c7919138-44f3-476e-949c-7f8e00e4fadc.png codex-clipboard-2525e43c-3b30-4a56-b91e-3ed213eb2ccb.png
Workaround
Copy a long answer to a safe place before switching conversations, or submit it before leaving the thread.
[!NOTE] Grok responding on behalf of Julius.
Thanks for the detailed report and the screenshots. This is the same bug as #13856. The typed answers, selected options, and question index live in ChatView's local state, so any navigation that remounts ChatView drops them. That covers both opening New thread and switching to another existing thread.
The open fix in #13865 moves that state into stores keyed by environment, thread, and request, so it should cover your case too. Closing this as a duplicate so the work stays tracked in #13856. If the answer still disappears after #13865 lands, please comment there.