[bug]: /undo is broken when you re-open opencode #1570

Open
opened 2026-02-16 17:31:36 -05:00 by yindo · 1 comment
Owner

Originally created by @sudo-tee on GitHub (Sep 2, 2025).

Originally assigned to: @thdxr on GitHub.

Since upgrading to 0.6.* I can no longer use the cli to inspect snapshots

I get the following error when diffing

Image

Content of the log file:

INFO 2025-09-02T15:39:57 +90ms service=default version=0.6.3 args=["debug","snapshot","diff","9c3ade0e86b07f09100ab1ae1d5acad855133985"] opencode
INFO 2025-09-02T15:39:57 +0ms service=project directory=/home/francis/Projects/_nvim/opencode.nvim fromDirectory
INFO 2025-09-02T15:39:57 +19ms service=config path=/home/francis/.config/opencode/config.json loading
INFO 2025-09-02T15:39:57 +0ms service=config path=/home/francis/.config/opencode/opencode.json loading
INFO 2025-09-02T15:39:57 +4ms service=config path=/home/francis/.config/opencode/opencode.jsonc loading
INFO 2025-09-02T15:39:57 +9ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin
INFO 2025-09-02T15:39:57 +2ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin
INFO 2025-09-02T15:39:57 +13ms service=bus type=* subscribing
INFO 2025-09-02T15:39:57 +1ms service=bus type=session.updated subscribing
INFO 2025-09-02T15:39:57 +0ms service=bus type=message.updated subscribing
INFO 2025-09-02T15:39:57 +0ms service=bus type=message.part.updated subscribing
INFO 2025-09-02T15:39:57 +0ms service=format init
INFO 2025-09-02T15:39:57 +0ms service=bus type=file.edited subscribing
INFO 2025-09-02T15:39:57 +0ms service=lsp serverIds=typescript, vue, eslint, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, rust, clangd enabled LSP servers
ERROR 2025-09-02T15:39:57 +8ms service=default name=ShellError message=Failed with exit code 128 stack=ShellError: Failed with exit code 128
at new ShellError (native:13:16)
at new ShellPromise (native:75:16)
at BunShell (native:191:35)
at diff (/$bunfs/root/opencode:77678:28)
at diff (/$bunfs/root/opencode:77676:25)
at (/$bunfs/root/opencode:99963:38)
at (/$bunfs/root/opencode:99962:47)
at (/$bunfs/root/opencode:97921:28)
at processTicksAndRejections (native:7:39) fatal

The snapshot folder is being deleted everytime I try to do a snapshot operation.

it seems to come from this https://github.com/sst/opencode/pull/2360

When the snapshot service is being initialized it deletes the content of the snapshot folder.

Thanks for your help

Originally created by @sudo-tee on GitHub (Sep 2, 2025). Originally assigned to: @thdxr on GitHub. Since upgrading to 0.6.* I can no longer use the cli to inspect snapshots I get the following error when diffing <img width="951" height="127" alt="Image" src="https://github.com/user-attachments/assets/e4e0a477-5902-4438-a79c-6541507d504e" /> Content of the log file: > INFO 2025-09-02T15:39:57 +90ms service=default version=0.6.3 args=["debug","snapshot","diff","9c3ade0e86b07f09100ab1ae1d5acad855133985"] opencode INFO 2025-09-02T15:39:57 +0ms service=project directory=/home/francis/Projects/_nvim/opencode.nvim fromDirectory INFO 2025-09-02T15:39:57 +19ms service=config path=/home/francis/.config/opencode/config.json loading INFO 2025-09-02T15:39:57 +0ms service=config path=/home/francis/.config/opencode/opencode.json loading INFO 2025-09-02T15:39:57 +4ms service=config path=/home/francis/.config/opencode/opencode.jsonc loading INFO 2025-09-02T15:39:57 +9ms service=plugin path=opencode-copilot-auth@0.0.2 loading plugin INFO 2025-09-02T15:39:57 +2ms service=plugin path=opencode-anthropic-auth@0.0.2 loading plugin INFO 2025-09-02T15:39:57 +13ms service=bus type=* subscribing INFO 2025-09-02T15:39:57 +1ms service=bus type=session.updated subscribing INFO 2025-09-02T15:39:57 +0ms service=bus type=message.updated subscribing INFO 2025-09-02T15:39:57 +0ms service=bus type=message.part.updated subscribing INFO 2025-09-02T15:39:57 +0ms service=format init INFO 2025-09-02T15:39:57 +0ms service=bus type=file.edited subscribing INFO 2025-09-02T15:39:57 +0ms service=lsp serverIds=typescript, vue, eslint, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, rust, clangd enabled LSP servers ERROR 2025-09-02T15:39:57 +8ms service=default name=ShellError message=Failed with exit code 128 stack=ShellError: Failed with exit code 128 at new ShellError (native:13:16) at new ShellPromise (native:75:16) at BunShell (native:191:35) at diff (/$bunfs/root/opencode:77678:28) at diff (/$bunfs/root/opencode:77676:25) at <anonymous> (/$bunfs/root/opencode:99963:38) at <anonymous> (/$bunfs/root/opencode:99962:47) at <anonymous> (/$bunfs/root/opencode:97921:28) at processTicksAndRejections (native:7:39) fatal The snapshot folder is being deleted everytime I try to do a snapshot operation. it seems to come from this https://github.com/sst/opencode/pull/2360 When the snapshot service is being initialized it deletes the content of the snapshot folder. Thanks for your help
Author
Owner

@sudo-tee commented on GitHub (Sep 4, 2025):

To add to the discussion

If I use the TUI and close it. The next time I open it the snapshot folder is gone and I get this error undoing a message

1 message reverted, 1 tool call reverted
ctrl+x r (or /redo) to restore

/dev/null -13

and it delete the all files it changed

Image
@sudo-tee commented on GitHub (Sep 4, 2025): To add to the discussion If I use the TUI and close it. The next time I open it the snapshot folder is gone and I get this error undoing a message 1 message reverted, 1 tool call reverted ctrl+x r (or /redo) to restore /dev/null -13 and it delete the all files it changed <img width="823" height="194" alt="Image" src="https://github.com/user-attachments/assets/6b16db9b-72cd-4295-b55b-41371d6d9307" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1570