anomalyco / anomalyco/opencode

run --session hangs when the model uses the question tool on an externally created session

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

@rekram1-node is already working on this.

Since Aug 24, 2026.

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

Description

Description

opencode run denies the question and plan tools only for sessions it creates. Resuming a session created through the HTTP API skips those rules, leaving the question tool available. If the model calls it, the server waits without a timeout and the run never returns. --auto only handles permission events, not question events.

Plugins

none

OpenCode version

1.18.21 (also present on current dev)

Steps to reproduce
  1. Start a server: opencode serve
  2. Create a session over HTTP: curl -s -X POST "$OPENCODE_URL/session" -H 'content-type: application/json' -d '{}'
  3. opencode run --auto --session <id> "use the question tool to ask me something"
  4. The command hangs until killed. The same prompt without --session exits 0 with "I don't have a question tool available".
Screenshot and/or share link

No response

Operating System

Linux (WSL2, Ubuntu)

Terminal

bash

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.