-
Notifications
You must be signed in to change notification settings - Fork 15.4k
opencode run hangs when model attempts to use question tool #11899
Copy link
Copy link
Description
Bug Description
When using opencode run, if the model attempts to use the question tool, the command hangs indefinitely. This happens because the question tool waits for user input that can never come in non-interactive mode.
Root Cause
run.ts correctly sets session permission rules to deny the question permission, but LLM.resolveTools only checked agent.permission when filtering disabled tools - it ignored session permissions. This allowed the question tool to remain available to the model.
Expected Behavior
The question tool should be excluded from the tools list in non-interactive mode, preventing the model from calling it.
Actual Behavior
The model can call the question tool, which then hangs waiting for a response.
Environment
- opencode version: 1.1.49
- OS: Linux
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.