Rewind
oi rewind <event> (also /rewind, ACP _oi/rewind, POST /session/{id}/rewind) moves the head and puts the workspace back to match. Every write and edit, including those made by sub-agents and Codemode scripts, stores the file's contents before and after in the event store (content-addressed blobs), with the path relative to the agent's directory. Rewinding undoes the changes on the abandoned part of the branch, newest first; rewinding onto another branch also redoes that branch's changes. A file whose current contents are not what oi last wrote (edited by hand, by a shell command, or elsewhere) is left alone and reported; --force overwrites it, --no-files moves only the conversation. Changes a shell command makes are not tracked. Restores only touch files inside the session's directory and the write roots, never through a symlink or into a credential store, so a crafted checkpoint cannot write elsewhere. Checkpoints carry the snapshots, except ones that contain a tracked secret or a well-known token format; an imported session restores files under its own directory.