Urgent.News

What's breaking now, across thousands of outlets.

AI

How to undo the changes an AI agent made to your files

You ask an AI agent to clean up a messy stylesheet. It edits three files, creates a fourth, reports that styles.css went from 212 lines to 41, and the page no longer renders. If the folder is a git repository and you committed right before, git checkout gets you most of the way. More often you didn't: there are edits of your own since the last commit, a .env the agent also touched that git…

To undo the changes an AI agent made to your files, follow these three steps using the osFoundry desktop app:

1. Point the chat at your project folder. In the Maestro chat interface, click the folder menu under the message box, select Browse folder…, and choose the project folder. The folder's name will appear in the menu, allowing the agent's file tools to operate within it. The app will create hidden copies of any files the agent modifies, named using their SHA-256 hash.

Larger files (over 8 MB) will be skipped and listed in the restoration process. If the project is a git repository, consider adding .osfoundry/ to your .gitignore to prevent checkpoints from being committed.

2. Type /rewind in the chat's message box. After selecting a folder with the agent's changes, enter /rewind and press Enter. The app will display a dialog listing each change the agent made, including the time of each change and the number of files affected. Access this command only in the desktop app, as the checkpoints live on your disk next to the project folder.

3. Choose the desired turn and restore it. Click the specific change that caused the issues, and confirm the action. The app will ask for confirmation and display details about the selected turn, such as the number of files affected and how many future changes would be undone. Restoring an older turn will also rollback subsequent changes.

Click Restore to revert the modifications. Edited files will return to their previous state, files created by the agent will be removed, and the confirmation message will show the number of edited and deleted files. Note that files the agent didn't modify remain untouched, even if you changed them. The chat's messages and its checkpoint will be removed, ensuring the folder matches the state before the agent's intervention.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

# We Put Our Math AI Through 50,000 Problems. It Passed All of Them in 11.4 Seconds.

50,000 problems. 10 mathematical and scientific categories. 100% correctly solved. Zero incorrect answers delivered. We just completed a major milestone in the development of Pythos Oracle , and I…

  • Pythos Oracle AI system solved 50,000 math problems in 11.4 seconds
  • System passed all problems without errors in 10 categories
  • Initial run had issues with calculations and physics questions

More from Friday 6 November →