Skip to content

Opencode process doesn't terminate after exiting Neovim #237

@maobai405

Description

@maobai405

Bug Description

After starting the plugin and then exiting Neovim, the opencode process continues to run in the background instead of terminating properly.

Steps to Reproduce

  1. Open Neovim
  2. Start opencode.nvim (e.g., press <leader>og or run :Opencode)
  3. Use the plugin normally (optional)
  4. Exit Neovim (:q or :qa)
  5. Check running processes (e.g., ps aux | grep opencode)

Expected Behavior

The opencode process should be terminated when Neovim exits.

Actual Behavior

The opencode process remains running in the background after Neovim has been closed.

Environment

  • Neovim version: (please fill in)
  • opencode.nvim version: (latest/main)
  • Opencode CLI version: (please fill in, run opencode --version)
  • OS: (please fill in)

Additional Context

This appears to be a cleanup issue where the plugin is not properly terminating the opencode child process on Neovim exit. The process may need to be explicitly killed or a proper shutdown signal sent when the plugin is unloaded or Neovim exits.

Please let me know if you need any additional information or logs to help diagnose this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions