You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/opencode/src/config/config.ts
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1052,7 +1052,12 @@ export namespace Config {
1052
1052
})
1053
1053
.optional(),
1054
1054
plugin: z.string().array().optional(),
1055
-
snapshot: z.boolean().optional(),
1055
+
snapshot: z
1056
+
.boolean()
1057
+
.optional()
1058
+
.describe(
1059
+
"Enable or disable snapshot tracking. When false, filesystem snapshots are not recorded and undoing or reverting will not undo/redo file changes. Defaults to true.",
Copy file name to clipboardExpand all lines: packages/web/src/content/docs/config.mdx
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -424,6 +424,23 @@ Customize keybinds in `tui.json`.
424
424
425
425
---
426
426
427
+
### Snapshot
428
+
429
+
OpenCode uses snapshots to track file changes during agent operations, enabling you to undo and revert changes within a session. Snapshots are enabled by default.
430
+
431
+
For large repositories or projects with many submodules, the snapshot system can cause slow indexing and significant disk usage as it tracks all changes using an internal git repository. You can disable snapshots using the `snapshot` option.
432
+
433
+
```json title="opencode.json"
434
+
{
435
+
"$schema": "https://opencode.ai/config.json",
436
+
"snapshot": false
437
+
}
438
+
```
439
+
440
+
Note that disabling snapshots means changes made by the agent cannot be rolled back through the UI.
441
+
442
+
---
443
+
427
444
### Autoupdate
428
445
429
446
OpenCode will automatically download any new updates when it starts up. You can disable this with the `autoupdate` option.
0 commit comments