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
Desktop: snapshot's git add --sparse --pathspec-from-file=- hangs indefinitely blocked on stdin (not a zombie — process stays alive in Ss state) #41648
Custom OpenAI-compatible provider (self-hosted llama.cpp), but confirmed unrelated to backend (see below)
Description
When running an agent task in a specific project, the Desktop UI gets stuck in "thinking" indefinitely. Root cause is a hung local git subprocess spawned by the snapshot/checkpoint feature — the LLM backend itself has already finished responding.
Reproduction (3/3 times, immediately, on this project)
Near-zero CPU time (0:01-0:00.78) across 14+ minutes elapsed — genuinely blocked, not slow
Holds an open index.lock in the snapshot git-dir (confirmed via lsof)
--pathspec-from-file=- reads the pathspec list from stdin; process appears blocked waiting for EOF on stdin that never arrives
Reproduced identically 3 times in a row, immediately after each retry, on the same project (~4200 files, 40MB, no unusual filenames/symlinks)
Confirmed NOT backend-related
Correlated with server-side request logs during the hang: the model had already finished generating (task released, GPU utilization back to 0%) while the Desktop UI still showed "thinking" — the hang is entirely in the local snapshot step, after the LLM response.
Workaround
kill <pid> + remove the stale index.lock unblocks the current turn, but recurs on retry for the same project
Setting top-level "snapshot": false in opencode.jsonc avoids the bug entirely (loses undo/revert capability) — this is what we ended up doing
Possibly related
#40439, #36370, #32981, #29413 - all snapshot-step hangs, but none match this exact symptom (live process blocked on stdin, not a zombie, not sidecar-stream-related, not Windows-specific)
Environment
Description
When running an agent task in a specific project, the Desktop UI gets stuck in "thinking" indefinitely. Root cause is a hung local
gitsubprocess spawned by the snapshot/checkpoint feature — the LLM backend itself has already finished responding.Reproduction (3/3 times, immediately, on this project)
Ss, sleeping/session-leader) — not a zombie/defunct child like opencode -c/-i TUI sessions hang permanently: zombie git child under project-copy-refresh snapshot step #40439index.lockin the snapshot git-dir (confirmed vialsof)--pathspec-from-file=-reads the pathspec list from stdin; process appears blocked waiting for EOF on stdin that never arrivesConfirmed NOT backend-related
Correlated with server-side request logs during the hang: the model had already finished generating (task released, GPU utilization back to 0%) while the Desktop UI still showed "thinking" — the hang is entirely in the local snapshot step, after the LLM response.
Workaround
kill <pid>+ remove the staleindex.lockunblocks the current turn, but recurs on retry for the same project"snapshot": falseinopencode.jsoncavoids the bug entirely (loses undo/revert capability) — this is what we ended up doingPossibly related
#40439, #36370, #32981, #29413 - all snapshot-step hangs, but none match this exact symptom (live process blocked on stdin, not a zombie, not sidecar-stream-related, not Windows-specific)