anomalyco / anomalyco/opencode
run --session hangs when the model uses the question tool on an externally created session
Open
@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
- Start a server:
opencode serve - Create a session over HTTP:
curl -s -X POST "$OPENCODE_URL/session" -H 'content-type: application/json' -d '{}' opencode run --auto --session <id> "use the question tool to ask me something"- The command hangs until killed. The same prompt without
--sessionexits 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
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.