anomalyco / anomalyco/opencode

TUI stays alive with EOF stdin and no TTY

Open
#42,234 2 comments 1 reaction 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 13, 2026.

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

Description

Reproduction
docker run -d --name opencode-eof node:22-bookworm-slim sleep infinity
docker exec opencode-eof npm install -g opencode-ai@1.18.18
timeout -s KILL 8s docker exec opencode-eof opencode </dev/null
docker top opencode-eof -eo pid,ppid,tty,stat,etime,args
Actual

opencode does not exit. After the docker exec client is killed, the TUI process remains in the container with no TTY.

Expected

Exit with a clear error when the TUI has EOF stdin and no prompt. Otherwise the process can hold an active exec session indefinitely and prevent auto-sleep for idle environments.

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.