Skip to content

permission: rejection feedback is replaced by generic tool errors #50157

Closed

Description

@pascalandr

Description

I reproduced permission rejection feedback disappearing before the next model request. The API accepts the full message, but the model receives only Unable to read <path> or Unable to execute command: ....

Permission.reply stores the text in CorrectedError.feedback. Built-in tools retain that error inside ToolFailure.error, but toSessionError does not handle CorrectedError; its empty message causes the generic tool message to win.

Plugins

No custom plugins. I reproduced this directly against an isolated OpenCode server with a local OpenAI-compatible provider fixture, without CodeNomad.

OpenCode version

2.0.11 stable; also reproduced on 2.0.10 and beta-19271.

Steps to reproduce

  1. Create a session with permissions: [{ action: "read", resource: "*", effect: "ask" }] and request a file read.
  2. Reject the pending request through POST /api/session/{sessionID}/permission/{requestID}/reply:
    { "decision": "reject", "message": "Do not read this file. Use the information already provided." }
  3. Inspect the tool result in the next model request. It contains Unable to read <path>, without the feedback. The same happens with shell.

I expected the denied tool result to contain the supplied feedback and the model to continue with it. Handling CorrectedError.feedback in toSessionError fixes both reproductions.

Standalone reproduction: node repro-permission-feedback.mjs <absolute-opencode-executable> read (or shell). It uses isolated storage and a local provider, prints the submitted reply and the next model request's tool result, and fails if feedback is missing.

Related client report: NeuralNomadsAI/CodeNomad#689.

Operating System

Windows 11, build 26200, x64. Node 25.2.1; PowerShell 7.6.6.

Terminal

Headless HTTP reproduction; no TUI involved.

Activity

  1. onelpawarai-X commented on Sep 20, 2026

    @onelpawarai-X

    🚀 Introducing ZYRAXON-AI: My Ultimate All-in-One Powerful Desktop Agent!

    I am thrilled to share my passion project—ZYRAXON-AI—a next-level, open-source desktop AI coding and automation agent designed to push the boundaries of what is possible.

    Check it out here: https://github.com/onelpawarai-X/ZYRAXON-AI.git

    This isn’t just another tool; it's an all-in-one powerhouse featuring Beast Mode (with self-evolution, persistent memory, mission control, and a sub-agent army), real-time Screen Vision, advanced code analysis for 40+ languages, system monitoring, and API testing capabilities.

    🌍 Looking for Collaborators & Visionaries:
    I am not building this just for today; my vision is to take ZYRAXON-AI to a level far beyond anything else out there, keeping it miles ahead of the competition. To achieve this, I am actively looking for trustworthy, passionate, and skilled individuals who want to collaborate, build, and grow together on this journey.

    Give it a try, star the repo, and if you share the same drive to create something extraordinary, let’s connect and make it happen! 💡✨

  2. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for the report and detailed reproduction! Permission rejection feedback now reaches the model instead of being replaced by a generic tool error, starting in 2.0.20. Update with opencode upgrade or npm i -g @opencode/cli@latest (desktop: update the app). Please reopen or comment if this still happens on that version or newer.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions