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
{{ message }}
Repository navigation
Snapshot git index.lock blocks LLM responses for 60+ seconds after crash #28952
On the next startup, every snapshot file-change operation tries to acquire the git lock, times out after ~30-40 seconds, and accumulates across multiple snapshot attempts. Since LLM streaming waits on snapshot operations, the total delay before the first token appears can exceed 60 seconds.
Log evidence:
ERROR SnapshotError: Failed to execute git command
Caused by: Unable to create '<path>/.git/index.lock': File exists.
Steps to Reproduce
Start OpenCode and use it normally
Force-kill the OpenCode process (or crash the system)
Restart OpenCode and send a message
Observe 60+ second delay before any response
Check ~/.local/share/opencode/log/ for snapshot-related errors
Workaround
Delete the stale git repository:
rm -rf ~/.local/share/opencode/snapshot/global/*/
OpenCode will recreate it on the next file change.
This issue might be a duplicate of an existing issue. Please check:
bug: stale snapshot index.lock breaks Modified Files and undo for one workspace #22275: Same root cause — stale index.lock in OpenCode's snapshot git repository causes repeated failures. That issue describes broken Modified Files/undo behavior from the same lock file problem and identical error message (Unable to create .../index.lock: File exists).
If your issue is distinct (e.g. the LLM response delay aspect isn't covered there), please clarify the difference so maintainers can decide whether to consolidate.
Activity
github-actions commentedon May 23, 2026
This issue might be a duplicate of an existing issue. Please check:
index.lockin OpenCode's snapshot git repository causes repeated failures. That issue describes broken Modified Files/undo behavior from the same lock file problem and identical error message (Unable to create .../index.lock: File exists).If your issue is distinct (e.g. the LLM response delay aspect isn't covered there), please clarify the difference so maintainers can decide whether to consolidate.
github-actions commentedon Jul 23, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.