anomalyco / anomalyco/opencode

opencode run hangs after 'event connected' — no model request ever made (DeepSeek, Linux)

Open
#44,782 2 comments 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Aug 24, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

opencode run hangs indefinitely right after the session is created ("event connected" in the log) and no request is ever made to the model provider. The spinner shows the model (> build · deepseek-chat) but the run never completes, even with a valid API key and working network.

Environment

  • OS: Linux ubuntu-docker-compose 6.8.0-138-generic x86_64 (Ubuntu)
  • opencode: 1.18.21 (also reproduced with 1.17.12)
  • node: v18.19.1 (for the 1.17 postinstall test)
  • Provider: deepseek (deepseek-chat), API key via config ~/.config/opencode/opencode.json apiKey and via DEEPSEEK_API_KEY env
  • Reproduction environments: (1) a Docker container (restricted, no capabilities) and (2) a bare-metal Ubuntu host — both hang identically

Steps to reproduce

  1. Install opencode 1.18.21 (official installer).
  2. Configure DeepSeek provider (or use DEEPSEEK_API_KEY env).
  3. Run: opencode run 'Respond with exactly: OK'
  4. Observe: the command hangs forever; the log stops at message="event connected".

Expected behavior

opencode run completes and prints the assistant response.

Actual behavior

  • The process never exits (killed only by timeout).
  • Log tail always ends at:
message=created id=ses_... version=1.18.21 ... model=undefined ...
message="event connected"
  • With --print-logs: nothing after "event connected" — no HTTP request is attempted.
  • Network verified: curl https://api.deepseek.com/v1/models returns 200 from the same host; models.dev and opencode.ai also 200.
  • The only successful run was the very first execution right after installation; every subsequent run hangs (even after deleting ~/.local/share/opencode and ~/.cache/opencode).

Notes

  • Same behaviour in the official npm binary (1.18.21, bun-compiled) and the 1.17.12 npm package (after running postinstall.mjs to fetch the real binary).
  • No crash, no error output — just a silent hang after "event connected".
  • This blocks all non-interactive/headless usage (CI, agent orchestration).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.