WARNING: You should probably just use the built-in command
/treefor this instead. It is much more flexible.
A simple
/undoextension/command for Pi coding agent: Navigate back in conversation history.
A plugin for Pi that provides context undo functionality. Allows you to back up to previous messages in the conversation, keeping the context window clean when the agent goes in the wrong direction.
- Context navigation: go back to previous messages in the conversation
- Simple undo command: quickly back up one step without visual UI
- Clean context: remove unwanted turns from the active conversation
pi install git:github.com/arcanemachine/pi-undoTo update to the latest version:
pi update git:github.com/arcanemachine/pi-undogit clone https://github.com/arcanemachine/pi-undo.git
cd pi-undo
npm install
pi install /path/to/pi-undo| Command | Description |
|---|---|
/undo |
Go back to the previous message in the conversation |
The /undo command navigates the session tree to a previous point in the conversation. Unlike /tree which shows a visual selector, /undo immediately goes back one step.
For example, if the conversation is:
- User: "Add a feature"
- Assistant: [response + tool calls]
- User: "/undo"
The context reverts to just before message #2, effectively removing the assistant's response from the active conversation.