As an agent user, I want to stop, cancel, resume or retry what my agent is doing, so that I stay in control of work done in my name.
Situation
I am in a conversation. The agent is working, is waiting for me, has paused, or its last reply failed. The controls are at the end of the conversation, reachable with the keyboard open.
What I do
To halt a reply in progress, tap "Stop" on the status line at the end.
To let a waiting run go on, tap "Answer" or "Resume" on its card.
To end a run for good, tap the red "Cancel" on its card.
To get a failed reply again, tap "Retry reply" under the error.
What I should see
While the agent works, the last row of the Agent session is a status line ("Thinking…", "Running a tool…" or "Replying…") with "Stop".
After "Stop" the status line goes away, the run's badge reads "Canceled" and I can write again.
A run that needs me has the badge "Waiting", a note such as "Waiting for an answer." and a button "Answer".
A run that stopped on its budget has the note "Paused on its budget. Resume to continue." and a button "Resume".
After "Answer" or "Resume" the run continues and its badge ends at "Done".
A run that waits on a timer or on sub-tasks says so and has no answer button.
Every run still in progress has a red "Cancel" on its run card.
A waiting run does not lock the message field. I can still send a message.
When the agent's turn failed, the error is shown in red. "Retry reply" is under it only when it is the last thing in the conversation and nothing is being written.
After "Retry reply" the agent answers again below the error. My own message is not repeated, and "Retry reply" is gone.
A conversation driven by another one has no message field. The line "Driven by a parent conversation. Open it to intervene." opens the parent, where I can act.
When something goes wrong
If a stop, cancel, answer or retry is refused or does not get through, a red line at the end of the conversation gives the reason with "Retry". "Retry" reloads the conversation. I then tap the control again.
Not included
"Answer" is one tap that lets the run go on. I cannot type an answer on the card or choose between answers. To say something, I send a message.
There is no confirmation before "Cancel" or "Stop", and neither can be undone.
Cancelling a run from its card has no automated screen test yet.
Trace
Story US-AGENT-07, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.
Design
Page | Part it plays |
|---|---|
Stop, Retry reply, Answer, Resume and Cancel, and the child session state | |
Turn error rows, pinned runs and the status line at the tail | |
Answer, Resume and Cancel on the card; waiting notes | |
The failure line when a command is refused | |
Waiting, Canceled, Done and Failed badges | |
Destructive Cancel and plain action buttons | |
Where confirmations are and are not used | |
Run badges and countdowns | |
Agent working, waiting on me and reply failed states | |
Controls stay in the transcript, reachable with the keyboard open | |
Red for destructive and failed |
Implementation
Page | Part it plays |
|---|---|
The stop, retry, cancel and signal commands | |
runRow: waiting, signal, note and live; error rows | |
Where the controls are drawn and when Retry reply is offered | |
Status and run changes that follow a command | |
Signed StopSession, RetrySession, CancelRun and SignalRun | |
The four actions and run wait reasons | |
agentsChanged, agentsError and the command actions | |
Mutation refreshes agentsData and agentsRunData | |
The UI tests of answer, stop, retry and resume | |
Scripted waiting, budget pause and failed turn sessions | |
Unit tests of waiting runs and command timestamps |
Code
File | What |
|---|---|
Run card note, Answer or Resume, Cancel | |
Status line with Stop | |
Turn error with Retry reply | |
Parent line in a child conversation | |
agentsError and the agentsChanged mutation | |
agentsStop, agentsRetryTurn, agentsCancel, agentsSignal | |
agentsAfterChange | |
stop, retry, cancel and signal commands | |
Wait note, waiting and signal in runRow | |
Turn error row |
Tests
File | What it checks |
|---|---|
a waiting run can be answered and a subsequent run can be stopped | |
RetrySession recovers the failed assistant reply without duplicating the user message | |
timer waits show a countdown and budget pauses resume through SignalRun | |
transcript and run presentation: settled plans freeze at the server stamp, while waiting runs remain pinned | |
commands sign with the caller clock, never a server-reported time |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime