Skip to content

bug: Permission request error #314

Description

@Shinzu

Prerequisites

  • I searched the docs
  • I searched existing issues

:checkhealth opencode output

==============================================================================
opencode: ✅

opencode.nvim ~

  • OS: Linux 6.8.0-124-generic (x86_64)
  • nvim version: 0.12.2+v0.12.2
  • opencode.nvim git commit hash: e9a2ab783f634dfdce60fef871694b5dcdd0057c
  • vim.g.opencode_opts: {
    lsp = {
    enabled = false
    },
    server = {
    start = <function 1>,
    stop = <function 2>,
    toggle = <function 3>
    }
    }

opencode.nvim [binaries] ~

  • ✅ OK opencode available with version 1.18.4.
  • ✅ OK curl available.
  • ✅ OK pgrep available.
  • ✅ OK lsof available.

opencode.nvim [snacks] ~

  • ✅ OK snacks.input enabled: ask() enhanced.
  • ✅ OK snacks.picker enabled: select() enhanced.

Describe the bug

When opencode plugin asks for permissions opencode returns an error

OpenCode permission request error: Request to http://localhost:4096/permission/per_f94ca6d51001i7C4YNAlAZDSkP/reply failed with exit code: 22
Response:
{"name":"BadRequest","data":{"message":"Expected \"once\" | \"always\" | \"reject\", got \"Once\"\n  at [\"reply\"]","kind":"Payload"}}

Stderr:
curl: (22) The requested URL returned error: 400

opencode version 1.18.4
plugin git hash: e9a2ab7

Steps To Reproduce

  1. ask opencode to edit file
  2. plugin ask for permission
  3. select one of the options in the selection

error i get

OpenCode permission request error: Request to http://localhost:4096/permission/per_f94ca6d51001i7C4YNAlAZDSkP/reply failed with exit code: 22
Response:
{"name":"BadRequest","data":{"message":"Expected \"once\" | \"always\" | \"reject\", got \"Once\"\n  at [\"reply\"]","kind":"Payload"}}

Stderr:
curl: (22) The requested URL returned error: 400

Expected Behavior

no error when send permission request to opencode

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions