{
  "id": 18433272,
  "title": "How to undo the changes an AI agent made to your files",
  "url": "https://urgent.news/2026/11/06/how-to-undo-the-changes-an-ai-agent-made-to-your-files",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-06T03:49:31.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/bestaitool/how-to-undo-the-changes-an-ai-agent-made-to-your-files-8a6"
  },
  "original_language": "en",
  "account": "To undo the changes an AI agent made to your files, follow these three steps using the osFoundry desktop app:\n\n1. 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.\n\n2. 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.\n\n3. 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.",
  "summary": "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…",
  "key_points": [
    "Point chat at project folder in Maestro interface",
    "Type \"/rewind\" to list agent's changes and affected files",
    "Select turn to restore and confirm action"
  ],
  "editors_take": "Automating file restoration through local checkpoints allows developers to safely experiment with AI agents by providing a granular way to revert unintended modifications and maintain project integrity.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}