anomalyco / anomalyco/opencode
TUI/server hangs at "project copy refresh started" on any git project (ARM64), input can't be submitted
@jlongster is already working on this.
Since Aug 16, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
On this machine (aarch64, devpod container, Debian 13), opencode's server never finishes booting in ANY directory that resolves to a git project: the log (~/.local/share/opencode/log/opencode.log) stops at message="project copy refresh started" and no session is ever created. The TUI renders ("Ask anything..." input box is visible) but Enter cannot submit any prompt because there is no active session. Running opencode in a non-git directory (e.g. $HOME, project global) works fine.
The hang is a JS-level deadlock: after all git commands complete successfully, the process keeps all 15 threads blocked in futex/clock_nanosleep/epoll (timer-retry pattern, ~38% CPU), no file I/O, no child processes. Reproduces regardless of: project content (even a brand-new empty git repo), fresh data dir (XDG_DATA_HOME), fresh DB (OPENCODE_DB), filesystem (overlay and ZFS both), "snapshots": false config, and version (1.18.17 and 1.18.18 both hang). Another x86_64 host with the same version has no such problem, so this looks environment/arch-specific (possibly Bun runtime on ARM64).
Plugins
None (only @opencode-ai/plugin installed, no plugins configured)
OpenCode version
1.18.18 (also reproduced on 1.18.17)
Steps to reproduce
- On an ARM64 Linux (devpod) host, create a fresh empty git repo: mkdir /tmp/t && cd /tmp/t && git init && echo x > a.txt && git add -A && git commit -m init
- Run opencode
- Type a prompt and press Enter — nothing happens; no response ever
- Check the log ~/.local/share/opencode/log/opencode.log — it ends with message="project copy refresh started" projectID=... and never logs booting location services
- Repeat from a non-git dir (e.g. $HOME) — works fine
Screenshot and/or share link
No screenshot available (headless container). The TUI does render fully when hung — input box shows "Ask anything...", model/agent bar renders, but no session ever starts, and Enter does nothing.
Key log evidence (~/.local/share/opencode/log/opencode.log) — boot stops forever right after the project copy refresh starts, only for git projects:
HANGING (git project):
timestamp=2026-08-16T03:51:45.430Z level=INFO run=98996fe2 message=init count=1
timestamp=2026-08-16T03:51:45.964Z level=INFO run=98996fe2 message="watcher backend" directory=/home/h3240105662/hpc101/src/lab4 platform=linux backend=inotify
timestamp=2026-08-16T03:51:45.977Z level=INFO run=98996fe2 message="project copy refresh started" projectID=0504f47a1f4391196f0785da377ce75b97055275
(nothing after — no "project copy refresh done", no "booting location services", no session created)
WORKING (non-git dir, same version):
timestamp=2026-08-16T05:30:26.447Z level=INFO run=061316ae message="project copy refresh started" projectID=global
timestamp=2026-08-16T05:30:26.451Z level=INFO run=061316ae message="project copy refresh done" projectID=global updated=[] removed=[]
timestamp=2026-08-16T05:30:26.553Z level=INFO run=061316ae message="booting location services" directory=/home/h3240105662 workspaceID=undefined
strace of the hung process: all spawned git commands (rev-parse, worktree list --porcelain, etc.) exit 0 successfully; afterwards the process's 15 threads sit permanently in futex/clock_nanosleep/epoll_pwait2 (~38% CPU, no file I/O, no child processes) — a JS-level deadlock with timer retries.
Operating System
Debian 13 (trixie), Linux aarch64 (ARM64), devpod container
Terminal
Alacritty (any terminal; reproduces under script too)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.