opencode icon indicating copy to clipboard operation
opencode copied to clipboard

tui output corrupted when using plugins

Open elithrar opened this issue 2 weeks ago • 1 comments

Description

When using plugins - e.g. my own git-worktree here - I see plugin output polluting the TUI.

  • This goes away when I resize the terminal itself (Ghostty version 1c2db85aa - nightly build)
  • It is reproducible 100% of the time - just re-invoke the plugin via prompt.
  • How can I get TUI logs or state to share here / investigate further?
Image Image

plugins all load correctly:

➜ opencode run hey --print-logs

INFO  2026-01-04T13:42:41 +279ms service=default version=0.0.0-dev-202601041317 args=["run","hey","--print-logs"] opencode
INFO  2026-01-04T13:42:41 +1ms service=default directory=/Users/matt/repos/dotfiles creating instance
INFO  2026-01-04T13:42:41 +0ms service=project directory=/Users/matt/repos/dotfiles fromDirectory
INFO  2026-01-04T13:42:41 +28ms service=default directory=/Users/matt/repos/dotfiles bootstrapping
INFO  2026-01-04T13:42:41 +2ms service=config path=/Users/matt/.config/opencode/config.json loading
INFO  2026-01-04T13:42:41 +0ms service=config path=/Users/matt/.config/opencode/opencode.json loading
INFO  2026-01-04T13:42:41 +0ms service=config path=/Users/matt/.config/opencode/opencode.jsonc loading
INFO  2026-01-04T13:42:42 +218ms service=bun cmd=["/Users/matt/.bun/install/global/node_modules/opencode-darwin-arm64/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/Users/matt/.config/opencode running
INFO  2026-01-04T13:42:42 +17ms service=config path=/Users/matt/repos/dotfiles/.opencode/opencode.jsonc loading
INFO  2026-01-04T13:42:42 +0ms service=config path=/Users/matt/repos/dotfiles/.opencode/opencode.json loading
INFO  2026-01-04T13:42:42 +0ms service=bun cmd=["/Users/matt/.bun/install/global/node_modules/opencode-darwin-arm64/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/Users/matt/repos/dotfiles/.opencode running
INFO  2026-01-04T13:42:42 +5ms service=plugin path=file:///Users/matt/repos/dotfiles/.opencode/plugin/git-worktree.ts loading plugin
INFO  2026-01-04T13:42:42 +27ms service=plugin [email protected] loading plugin
INFO  2026-01-04T13:42:42 +0ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/[email protected]

[5.00ms] done
 stderr=Saved lockfile
 done
INFO  2026-01-04T13:42:42 +0ms service=bun cmd=["/Users/matt/.bun/install/global/node_modules/opencode-darwin-arm64/bin/opencode","install"] cwd=/Users/matt/.config/opencode running
INFO  2026-01-04T13:42:42 +1ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

Plugins

git-worktree

OpenCode version

0.0.0-dev-202601041317

Steps to reproduce

  1. Install/copy over https://github.com/elithrar/dotfiles/blob/main/.config/opencode/plugin/git-worktree.ts
  2. Run opencode + ask it to create worktrees
  3. Observe what appears to be polluted TUI rendering?

elithrar avatar Jan 04 '26 13:01 elithrar