Skip to content

bug: toggling tmux seems to leave multiple opencode --port processes running #170

@jhillyerd

Description

@jhillyerd

Did you check docs and existing issues?

  • I have read the plugin docs
  • I have read the opencode docs
  • I have searched the existing plugin issues
  • I have searched the existing opencode issues

:checkhealth opencode output

opencode.nvim ~ - OS: Linux 6.12.67 (x86_64) - nvim version: 0.11.5. - opencode.nvim git commit hash: 632ec5879295a3103fa39742b2e3f0639496c96f. - vim.g.opencode_opts: { provider = { enabled = "tmux" } } opencode.nvim [binaries] ~ - ✅ OK opencode available with version 1.1.53. - ✅ OK curl available. - ✅ OK pgrep available. - ✅ OK lsof available. opencode.nvim [snacks] ~ - ✅ OK snacks.input is enabled: ask() will be enhanced. - ✅ OK snacks.picker is enabled: select() will be enhanced. opencode.nvim [providers] ~ - ✅ OK Configured opencode provider: tmux. - ✅ OK The snacks provider is available. - ⚠️ WARNING The kitty provider is not available — KITTY_LISTEN_ON environment variable is not set. - ADVICE: - Enable remote control in kitty. - ⚠️ WARNING The wezterm provider is not available — wezterm executable not found in $PATH. - ADVICE: - Install wezterm and ensure it's in your $PATH. - ✅ OK The tmux provider is available. - ✅ OK The terminal provider is available.

Describe the bug

When using the tmux integration, things seem to break if toggle() is used to close the opencode tmux pane.

Steps To Reproduce

  1. Start nvim with no opencode processes running
  2. ask() a question, opencode tmux pane opens and answers, single opencode --port process is running
  3. Use toggle() to close the opencode window
  4. opencode --port remains running
  5. Use ask() again, input box opens instantly but no opencode pane is visible
  6. Submitting ask() prompt has no effect
  7. Running toggle() launches a new opencode pane, there ar enow two opencode --port processes running
  8. Running ask() again works this time

Expected Behavior

I'm not sure exactly how toggle should work with tmux, but I think it should either re-use the existing process or shut it down.

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