anomalyco / anomalyco/opencode

[BUG]: Desktop: denying a tool permission prompt silently stops the whole agent turn (replacement for stale-closed #30726)

Open
#44,255 0 comments 1 reaction 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 22, 2026.

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

Description

Description

This is a replacement for #30726, which was auto-closed by the stale bot after 60 days of inactivity with an invitation to open a new issue. The behavior is unchanged as far as I can tell in OpenCode Desktop 1.18.21.

In OpenCode Desktop, denying a tool permission prompt silently stops the current agent turn by default.

The prompt reads like the user is rejecting one specific tool call — but the effect is that the whole agent loop ends locally, with no follow-up model request carrying the denied-tool result. To the user it looks like the model or provider stopped mid-task.

Steps to reproduce
  1. Run an agent session in OpenCode Desktop on Windows.
  2. Let the model request a tool that triggers a permission prompt.
  3. Deny the requested tool call.
  4. Observe: the denied tool is recorded as a tool error (The user rejected permission to use this specific tool call.), the agent loop stops, and no follow-up request is sent with the denial as context.
Expected behavior

One of:

  • Denying a tool permission continues the loop by default and feeds the rejection back to the model so it can take a different approach
  • Or Desktop makes the choice explicit with distinct actions such as "Reject and stop" vs. "Reject and continue"
  • Or the permission prompt at least surfaces/documents the experimental.continue_loop_on_deny option

The workaround today remains invisible config:

{
  "experimental": {
    "continue_loop_on_deny": true
  }
}

Other agent tools commonly treat a denied call as information for the model ("rejected; try something else"), not as a hidden abort action.

Related context

Since #30726 was filed, this area has seen substantial related activity, which underlines how central predictable permission behavior is: #42436 (permission prompt/deny-rule bypasses), #44246 (keyboard-first permission prompts), #40909 (permissions management UI), plus a cluster of deny-rule matching bugs (#41970, #37935, #35503). Related older reports: #7730, #14297, #9651, #29422.

Environment
  • App: OpenCode Desktop 1.18.21
  • OS: Microsoft Windows 11 Education, 25H2, build 26200.8875

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.