Manual Retry for Duo Chat Responses
## User problem to solve As a developer, when Duo Chat gives me a response that's off-base, my only option is to ask it to "try again" in natural language. That's unreliable. The LLM might interpret it differently, respond to it literally, or drift from my original intent. There's no reliable way to regenerate a response without retyping the prompt or hoping natural language works. ## Proposal ![image.png](/uploads/1da7d72240d7992146a95fc255ead61b/image.png){width=900 height=539} Add a retry icon to the response action bar, after the existing buttons. - Retry icon appears on completed attempts of the latest turn - Does not appear on intermediate tool call steps - Action buttons (including retry) are hidden during streaming, same as today - User must stop generation before retry becomes available - Stopped responses show the retry button once streaming ends #### Acceptance Criteria **Scenario 1: Retry a response:** Given a completed or stopped Duo Chat response, when the user clicks the retry button, Duo resubmits the original prompt with the current conversation history. A new response streams in the main view. The retry consumes credits like any other response. **Scenario 2: Previous attempts are preserved after retry:** Given a response has been retried, the previous response is replaced by the new response in the main view. A navigation counter appears (e.g., "2/2") with arrow buttons to browse attempts. **Scenario 3: Retry while streaming:** Given Duo Chat is actively streaming a response, no action buttons are visible. The user must stop generation before retrying. **Scenario 4: Navigation counter appears after retry:** Given a response has been retried one or more times, a navigation counter appears on the response (e.g., "1/2", "2/2"). The user can browse previous attempts using arrow buttons. **Scenario 5: Prior turns are view only.** Given a turn has been retried at least once, when the user sends a follow-up, then the displayed attempt becomes the history. Other attempts can be viewed but not retried or selected. **Scenario 6: Feedback is independent per attempt:** Given a response has been retried one or more times, each attempt retains its own feedback buttons (thumbs up/down). **Scenario 7: Conversation continues from selected attempt:** Given a response has been retried at least once, when the user sends a followup, then only the displayed attempt is sent as context and other attempts are excluded. **Scenario 8: Retry fails:** Given the user clicks retry, when the backend returns an error or times out, an inline error appears: "Retry failed" with a "Try again" option. **Scenario 9: Previous attempt accessible after failed retry:** Given a retry has failed, the previous attempt is still accessible via navigation arrows. **Scenario 10: Retry re-fetches current context:** Given a prompt that referenced contextual data (an MR, issue, file, etc.), when the user retries that response, Duo re-fetches the current state of that context. The new response reflects any changes since the original. ### **In Scope:** - Retry button on every completed Duo Chat response - Independent feedback per attempt - No soft or hard retry limit ### **Out of scope:** * Automatic retry on backend/tool call failures * Retrying foundational flows (e.g., Fix Pipeline). When Duo confirms and kicks off a flow, retry does not apply to that interaction. Foundational flows are a separate effort. * Retry on intermediate tool call steps (only the final response gets a retry button) ### Feature delivery process 1. Enable for internal team members 2. Given no feedback that forces us to pivot 3. Enable for all deployments with the next release
epic