Skip to content

opencode run hangs when model attempts to use question tool #11899

Closed

Description

@justindra

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

Activity

  1. github-actions commented on Feb 3, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. S0LERA commented on Feb 17, 2026

    @S0LERA

    +1

  3. tim-sh commented on Feb 25, 2026

    @tim-sh

    +1

  4. rekram1-node commented on Mar 26, 2026

    @rekram1-node
    Contributor

    Believe this has been resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions