GitHub user ofekron added a comment to the discussion: Revert & Redo for AI 
Agent turns (rewind the workflow to before an agent edit)

Per-turn is the right default, but snapshot rewind needs an optimistic 
concurrency precondition before it replaces the live canvas.

Consider this sequence: the agent finishes turn T; the user manually edits the 
workflow; then the user clicks Revert on T. Reloading T.beforeWorkflowContent 
would silently erase the later human edit even though HEAD still points at T.

I would bind each step to beforeRevision/beforeDigest and 
afterRevision/afterDigest, then require revert to include the client’s 
currently observed workflow revision. The backend compares that with the 
authoritative current revision:

- exact match: move HEAD and apply the recorded snapshot;
- mismatch caused by later manual edits or another client: reject with a 
structured conflict and preserve both states;
- reconnect: fetch HEAD, current workflow revision, branch children, and redo 
availability from one backend snapshot.

For a later version, storing the agent turn as a reversible workflow patch 
would allow a three-way revert that removes only the agent’s changes while 
retaining compatible human edits. Until then, fail closed on revision mismatch 
is safer than snapshot replacement.

Redo state and the step tree should also survive agent-service restart if 
workflow snapshots themselves persist; otherwise the UI advertises a history 
model that disappears independently of the workflow it governs.

This backend-owned revision/projection split is how Better Agent keeps native 
Claude, Codex, and Gemini session state consistent across reconnects and 
concurrent clients. I maintain the project; it is source-available and free for 
non-commercial use, while commercial use requires separate permission: 
https://github.com/ofekron/better-agent

AI-assistance disclosure: this comment was drafted by Codex under the 
maintainer’s authorization and reviewed in Better Agent.

GitHub link: 
https://github.com/apache/texera/discussions/6039#discussioncomment-17693743

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to