Skip to content

Streaming request ends with "Streaming request exited with code 1" #485

Closed

Description

@cagechi

Environment

  • OS: Windows
  • Neovim: 0.12.4
  • opencode.nvim: e708ba3
  • OpenCode CLI: 1.17.18

Description

Immediately after opening opencode.nvim, the following warning is displayed:

[opencode.nvim] Streaming request exited with code 1

The warning appears before any user prompt is submitted.

After adding debug output to server_job.lua, I observed:

EXIT CODE 1
EXIT SIGNAL 15
STDERR ERR= nil
STDERR DATA= nil
STDOUT nil
STDERR nil

While investigating, I found that the stream process exits with signal = 15 and the warning is emitted from the stream exit handler.

Additional Information

  • :checkhealth opencode passes successfully.
  • opencode.exe is available and works correctly from both PowerShell and Neovim.
  • curl.exe is available.
  • OpenCode server starts successfully.
  • The warning appears before any prompt is submitted.
  • Debugging shows the stream process exits with signal = 15.

Activity

  1. sudo-tee commented on Aug 31, 2026

    @sudo-tee
    Owner

    @cagechi

    Can you post your opencode config and your opencode.nvim config ?

  2. cagechi commented on Aug 31, 2026

    @cagechi
    Author

    My configuration is as follows:

    return {
      "sudo-tee/opencode.nvim",
      event = "VeryLazy",
      dependencies = { "nvim-lua/plenary.nvim", },
      config = function()
        require("opencode").setup({})
      end,
    }

    After updating from Commit 60e1437 to Commit 71b3397, the issue appears to have started.
    It seems likely that the problem began after this update.

  3. sudo-tee commented on Sep 2, 2026

    @sudo-tee
    Owner

    I am still not able to reproduce it.
    Do you have a default model set in your opecode.json ?

  4. sudo-tee commented on Sep 8, 2026

    @sudo-tee
    Owner

    @cagechi

    I have a branch where I fixed some async issues in server startup.

    #488

    Let me know if by any chances it fixes your issue.

    if not, can you show me your opencode.json not this plugin but your actual config for opencode ?

  5. cagechi commented on Sep 9, 2026

    @cagechi
    Author

    @sudo-tee

    Sorry for the delayed response.
    I tried the pr-488 branch, but the situation did not change.

    The contents of my opencode.jsonc file are as follows:

    {
      "$schema": "https://opencode.ai/config.json",
      "autoupdate": false,
      "disabled_providers": [],
      "model": "google-vertex/gemini-2.5-flash",
      "small_model": "google-vertex/gemini-2.5-flash",
      "default_agent": "plan",
      "agent": {
        "build": {
          "prompt": "All non-code text responses must be written in the Japanese language indicated."
        },
        "plan": {
          "prompt": "All non-code text responses must be written in the Japanese language indicated."
        }
      },
      "provider": {
        "perplexity": {
          "options": {
            "apiKey": "{env:PERPLEXITY_API_KEY}",
            "baseURL": "https://api.perplexity.ai"
          },
          "models": {
            "sonar": {
              "name": "sonar"
            }
          }
        },
        "anthropic": {
          "options": {
            "apiKey": "{env:ANTHROPIC_API_KEY}"
          },
        },
        "openai": {
          "options": {
            "apiKey": "{env:OPENAI_API_KEY}"
          },
        },
        "gemini": {
          "options": {
            "apiKey": "{env:GEMINI_API_KEY}"
          },
        },
        "deepseek": {
          "options": {
            "apiKey": "{env:DEEPSEEK_API_KEY}"
          }
        },
        "ollama": {
          "npm": "@ai-sdk/openai-compatible",
          "name": "Ollama (local)",
          "options": {
            "baseURL": "http://localhost:11434/v1",
          },
          "models": {
            "qwen2.5:7B": {
              "name": "qwen2.5:7B",
            }
          }
        }
      },
      "command": {
        "test": {
          "template": "Run the full test suite with coverage report and show any failures.\nFocus on the failing tests and suggest fixes.",
          "description": "Run tests with coverage",
          "agent": "build",
          // "model": "anthropic/claude-3-5-haiku-latest"
        },
        "explain": {
          "template": "You are an expert programmer who excels at explaining code clearly and concisely.",
          "description": "Explain source code",
        }
      },
      "keybinds": {
        "leader": "ctrl+e",
        "app_exit": "ctrl+c,ctrl+d,<leader>q",
        "editor_open": "<leader>e",
        "theme_list": "<leader>t",
        "sidebar_toggle": "<leader>b",
        "scrollbar_toggle": "none",
        "username_toggle": "none",
        "status_view": "<leader>s",
        "tool_details": "none",
        "session_export": "<leader>x",
        "session_new": "<leader>n",
        "session_list": "<leader>l",
        "session_timeline": "<leader>g",
        "session_fork": "none",
        "session_rename": "none",
        "session_share": "none",
        "session_unshare": "none",
        "session_interrupt": "escape",
        "session_compact": "<leader>c",
        "session_child_cycle": "<leader>right",
        "session_child_cycle_reverse": "<leader>left",
        "session_parent": "<leader>up",
        "messages_page_up": "pageup,ctrl+alt+b",
        "messages_page_down": "pagedown,ctrl+alt+f",
        "messages_line_up": "ctrl+alt+y",
        "messages_line_down": "ctrl+alt+e",
        "messages_half_page_up": "ctrl+alt+u",
        "messages_half_page_down": "ctrl+alt+d",
        "messages_first": "ctrl+g,home",
        "messages_last": "ctrl+alt+g,end",
        "messages_next": "none",
        "messages_previous": "none",
        "messages_copy": "<leader>y",
        "messages_undo": "<leader>u",
        "messages_redo": "<leader>r",
        "messages_last_user": "none",
        "messages_toggle_conceal": "<leader>h",
        "model_list": "<leader>m",
        "model_cycle_recent": "f2",
        "model_cycle_recent_reverse": "shift+f2",
        "model_cycle_favorite": "none",
        "model_cycle_favorite_reverse": "none",
        "variant_cycle": "ctrl+t",
        "command_list": "ctrl+p",
        "agent_list": "<leader>a",
        "agent_cycle": "tab",
        "agent_cycle_reverse": "shift+tab",
        "input_clear": "ctrl+u",
        "input_paste": "ctrl+v",
        "input_submit": "return",
        "input_newline": "shift+return,ctrl+return,alt+return,ctrl+j",
        "input_move_left": "left,ctrl+b",
        "input_move_right": "right,ctrl+f",
        "input_move_up": "up",
        "input_move_down": "down",
        "input_select_left": "shift+left",
        "input_select_right": "shift+right",
        "input_select_up": "shift+up",
        "input_select_down": "shift+down",
        "input_line_home": "ctrl+a",
        "input_line_end": "none",
        "input_select_line_home": "ctrl+shift+a",
        "input_select_line_end": "ctrl+shift+e",
        "input_visual_line_home": "alt+a",
        "input_visual_line_end": "alt+e",
        "input_select_visual_line_home": "alt+shift+a",
        "input_select_visual_line_end": "alt+shift+e",
        "input_buffer_home": "home",
        "input_buffer_end": "end",
        "input_select_buffer_home": "shift+home",
        "input_select_buffer_end": "shift+end",
        "input_delete_line": "ctrl+shift+d",
        "input_delete_to_line_end": "ctrl+k",
        "input_delete_to_line_start": "ctrl+u",
        "input_backspace": "backspace,shift+backspace",
        "input_delete": "ctrl+d,delete,shift+delete",
        "input_undo": "ctrl+-,super+z",
        "input_redo": "ctrl+.,super+shift+z",
        "input_word_forward": "alt+f,alt+right,ctrl+right",
        "input_word_backward": "alt+b,alt+left,ctrl+left",
        "input_select_word_forward": "alt+shift+f,alt+shift+right",
        "input_select_word_backward": "alt+shift+b,alt+shift+left",
        "input_delete_word_forward": "alt+d,alt+delete,ctrl+delete",
        "input_delete_word_backward": "ctrl+w,ctrl+backspace,alt+backspace",
        "history_previous": "up",
        "history_next": "down",
        "terminal_suspend": "ctrl+z",
        "terminal_title_toggle": "none",
        "tips_toggle": "<leader>h"
      }
    }
    
  6. sudo-tee commented on Sep 9, 2026

    @sudo-tee
    Owner

    I don't have a windows only setup to reproduce the issue.

    Can you put the checkhealth opencode just in case

  7. sudo-tee commented on Sep 10, 2026

    @sudo-tee
    Owner

    @cagechi

    I have a potential fix for this issue, #491

    Can you let me know if it works for you ?

  8. cagechi commented on Sep 11, 2026

    @cagechi
    Author

    @sudo-tee
    Thanks for the fix! I tested it, and it works now.

    Sorry for the back-and-forth, and thank you for taking the time to look into this and make the fix.
    Thanks again for your help!

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions