TL;DR: Open Edit β AI History (or press ββ§Z) and pick the agent turn you want to rewind to. LingCode's pre-edit snapshots restore project.pbxproj, Info.plist, build.gradle, and all touched files to their pre-turn state β no git checkout needed.
When the agent corrupts an Xcode project file or flattens your entitlements, you don't reach for git. LingCode keeps per-file snapshots of every protected change so you can roll back in two clicks.
Most of what an AI agent edits is ordinary source code, and most of that is easy to undo with git checkout. But agents also touch a smaller, much more dangerous set of files: the ones that hold your project together. .pbxproj ties Xcode targets to files. Info.plist declares your app's identity. .entitlements grants every capability you depend on. AndroidManifest.xml and build.gradle play the same role on the Android side. One stray edit here is the difference between "my project compiles" and "my project refuses to build, and I can't tell why."
The reason git isn't enough is timing. Git captures what you've committed. Bad agent edits happen between commits, in a working tree that's already dirty with your own legitimate work. By the time you notice β usually because a build broke β the bad edit and your good edits are tangled together. git checkout rolls back everything since the last commit, including the work you wanted to keep.
LingCode's answer is per-file snapshots: every change the agent makes to a protected file is captured just before it lands. So when something breaks, you don't have to choose between losing your work and shipping a broken project β you just rewind the single file that went wrong.
git checkoutAI agents are confident editors of plain source code. Where they get into trouble is the project's configuration: the .pbxproj that ties an Xcode project together, Info.plist, .entitlements, scheme files, and the Android equivalents (AndroidManifest.xml, build.gradle).
A single misplaced key here can make your project refuse to build or silently strip a capability like push notifications. LingCode snapshots every change to these files automatically β every time the agent touches one, a versioned copy is saved before the write goes through.
git checkout only sees what you've staged.
Look at the top of the editor for the shield icon labeled Recover. Click it. A side panel slides open listing every protected file that has snapshots, with the most recently edited at the top.
Each entry shows the file path, how many snapshots exist, and when the most recent one was taken. Files that haven't been touched by the agent won't appear here β the panel is a focused list of what's actually at risk.
Selecting a file expands a chronological list of every snapshot: timestamp, the agent action that triggered it (e.g. "edit_file via Claude"), and a diff against the current on-disk version.
Read the diff before reverting. The agent may have made a legitimate change and a separate small mistake β the diff shows you exactly what shifted.
Pick the snapshot you want and click Restore. LingCode writes that version back to disk, and the editor reloads. If the file is currently open, the buffer updates in place.
Restoring is itself a recoverable action β the current state becomes a new snapshot before being overwritten, so you can undo the undo if needed.
.pbxproj AND a Swift file in the same turn), restore each file you want rolled back. Group rollback is on the roadmap.
The cheapest recovery is the one you never need. When the agent proposes an edit to a config file, a permission dialog shows the file path and the diff before applying. Click Reject and the change never touches disk β no snapshot needed.
If you set the permission mode to default, every config edit prompts. acceptEdits auto-accepts but still snapshots. plan mode shows you what the agent would do without executing.
Snapshots cover the protected file set β they're a finely-grained safety net for the specific things agents most often wreck. For broader recovery (an agent that touched dozens of source files), use git: git status shows what changed, git restore <file> rolls back individual files, git stash sets the whole working tree aside.
For high-risk experiments, see Experiment safely with worktrees β a stronger isolation pattern that keeps risky agent runs out of your main branch entirely.
.lingcode/snapshots/ inside your project β copy a file back manually if you need to.