You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
run --session hangs when the model uses the question tool on an externally created session #44556
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 --session exits 0 with "I don't have a question tool available".
This issue might be a duplicate of existing issues. Please check:
opencode run hangs when model attempts to use question tool #11899: opencode run hangs when model attempts to use question tool — same root cause (question tool available in non-interactive run mode, hangs waiting for input), previously fixed in 1.1.49 but apparently regressed for sessions created via the HTTP API.
Not a duplicate. #11899 added the deny rules at session create; the --session/--continue/--fork paths just never apply them, so HTTP-created sessions slip through. #44559 extends that fix to those paths.
This is fixed in v2: non-interactive opencode run cancels question requests for the session it is running, including resumed sessions, and tells the model to continue without an answer instead of waiting for input. Upgrade with npm i -g @opencode/cli@latest. If you still see this on v2, please open a new issue with the details.
Activity
github-actions commentedon Aug 24, 2026
This issue might be a duplicate of existing issues. Please check:
opencode runhangs when model attempts to use question tool — same root cause (question tool available in non-interactive run mode, hangs waiting for input), previously fixed in 1.1.49 but apparently regressed for sessions created via the HTTP API.gitRasheed commentedon Aug 24, 2026
Not a duplicate. #11899 added the deny rules at session create; the --session/--continue/--fork paths just never apply them, so HTTP-created sessions slip through. #44559 extends that fix to those paths.
neriousy commentedon Oct 19, 2026
This is fixed in v2: non-interactive
opencode runcancels question requests for the session it is running, including resumed sessions, and tells the model to continue without an answer instead of waiting for input. Upgrade withnpm i -g @opencode/cli@latest. If you still see this on v2, please open a new issue with the details.