Repository navigation
Review mode for the agent: accept, reject, or request changes before edits are kept #8931
CaroFernando
started this conversation in
Ideas
Replies: 1 comment
|
I like the idea in general |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Today the agent applies every workflow edit as soon as it makes it.
addOperator,modifyOperatoranddeleteOperatorchange the workflow mid-run, the change is saved, and it appears on the canvas. The user can only react after the whole run, when several edits may have stacked up. In #8682 the reporter asked for a way to review changes first, because "sometimes it edits to be worse".I'd like to add an optional review mode. The agent runs as it does today. When the run ends, the chat shows the before → after changes to the workflow, with three choices: Accept all, Reject all and Request changes.
This is a design proposal, so there is no PR yet. I'd like agreement on the behavior before writing code.
Today
A real run on a local build (fork main, model
anthropic/claude-haiku-5.5), prompt: "Build a small workflow: a CSV File Scan, then a Filter keeping rows where age > 30, then a Bar Chart of count per city."addOperatoraddOperatorage > 30applied and savedaddOperatoraddOperatorexecuteOperatorAll four edits landed before the user saw anything, and they stayed even though the run ended without a working result. There was no point at which the user could say "not like this".
Proposal
Mockup. After the run, the chat shows one review card with every change since the last accepted workflow. Changed operators are highlighted on the canvas, which is locked until the user decides.
Behavior
autoandreview.autois today's behavior and stays the default, so nothing changes for existing users.addOperatorcalls separately, without seeing the next one, would be harder than judging the finished pipeline once.Request changes
Mockup. The user asked for a pie chart instead. The agent revised its pending edits, and the card still shows the full change from the original (empty) workflow: 4 added, with the chart now a Pie Chart.
Setting
Mockup. A switch in the existing agent settings modal. Off means today's behavior.
Lifecycle
stateDiagram-v2 [*] --> Idle Idle --> Running: prompt (baseline = current workflow) Running --> Idle: run ends, no changes Running --> ReviewPending: run ends / stopped / error, with changes ReviewPending --> Running: Request changes (same baseline) ReviewPending --> Idle: Accept all (keep edits) ReviewPending --> Idle: Reject all (restore baseline)Implementation sketch
I have a 4-PR split planned (backend state → WS frames → UI card → diff view). Each PR keeps CI green, and the first two are invisible until the UI lands.
Alternatives considered
Related work
#6039 proposes Revert / Redo per agent turn: undo an agent turn after its edits were kept. This proposal is the other half: review the edits before they are kept. They fit together. "Reject all" here restores the same "workflow before the turn" snapshot that a revert would, so both can share one restore mechanism in agent-service. As far as I can tell, #6039 hasn't landed yet. @bobbai00 @Ma77Ball, since you weighed in there, I'd value your view on whether these should be designed together.
Open questions
Related: #8682 (origin), #6039 (revert/redo agent turns), #5267 (agent state persistence), #5747 (agent-service refactor)
All reactions