Chat: a failed answer to an agent question deletes the question and the reply #1728

Closed
opened 2026-11-02 04:11:40 +00:00 by sam · 2 comments
Owner

answerAsk in ui/src/chat/state.ts:171-177 clears the pending question before it calls api.chatAnswer, and has no catch. Callers are ChatAskCard.vue:18-51 and ChatQuestionnaire.vue:136.

If the request fails, the question card disappears, the operator's answer is lost, and the turn keeps waiting with no message.

Done when: the question stays until the answer is accepted, a failure restores it with the answer still filled in, and the error shows on the card.

`answerAsk` in `ui/src/chat/state.ts:171-177` clears the pending question before it calls `api.chatAnswer`, and has no catch. Callers are `ChatAskCard.vue:18-51` and `ChatQuestionnaire.vue:136`. If the request fails, the question card disappears, the operator's answer is lost, and the turn keeps waiting with no message. Done when: the question stays until the answer is accepted, a failure restores it with the answer still filled in, and the error shows on the card.
sam added the highbug labels 2026-11-02 04:11:40 +00:00
sam self-assigned this 2026-11-02 04:11:40 +00:00
Author
Owner

Fixed in e9937ded and pushed. answerAsk now awaits api.chatAnswer first and clears streamingTurn.ask only on success, resolving true/false; on failure it sets the new askError ref and returns false, so the question card stays and the turn keeps waiting with the error visible. ChatAskCard shows askError as a ReadError with a Retry that resends the last answer (lastAnswer), keeps the typed reply filled in until the answer is accepted, and routes Deny/Always/Approve/choice buttons through the same answer() wrapper; ChatQuestionnaire submits through the card's send so questionnaire answers retry too. askError resets at turn start, on each new ask frame, and in selectSession. Verified: task check exited 0 on the committed tree.

Fixed in e9937ded and pushed. answerAsk now awaits api.chatAnswer first and clears streamingTurn.ask only on success, resolving true/false; on failure it sets the new askError ref and returns false, so the question card stays and the turn keeps waiting with the error visible. ChatAskCard shows askError as a ReadError with a Retry that resends the last answer (lastAnswer), keeps the typed reply filled in until the answer is accepted, and routes Deny/Always/Approve/choice buttons through the same answer() wrapper; ChatQuestionnaire submits through the card's send so questionnaire answers retry too. askError resets at turn start, on each new ask frame, and in selectSession. Verified: task check exited 0 on the committed tree.
Author
Owner

Fixed in e9937ded and pushed to main. Gate: task check exited 0 on the committed tree.

Fixed in e9937ded and pushed to main. Gate: task check exited 0 on the committed tree.
sam closed this issue 2026-11-07 06:09:24 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1728