opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[0.2.6] pasting with ctrl+v crashes the program.

Open brunobmello25 opened this issue 1 year ago • 24 comments

Version: 0.2.6 Terminal emulator: alacritty Running with tmux: yes window manager: awesomewm with xorg

Steps to reproduce:

  • copy some string
  • run opencode
  • press ctrl+v

this will crash the program with the following output:

Caught panic:

clipboard: cannot use when CGO_ENABLED=0

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:26 +0x5e
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:18 +0x13
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0xc0004ce200, {0xbd99e0, 0x106b3a0})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1134 +0xc5
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:871 +0xe8
panic({0xbd99e0?, 0x106b3a0?})
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x132
golang.design/x/clipboard.read(...)
        /home/runner/go/pkg/mod/golang.design/x/[email protected]/clipboard_nocgo.go:12
golang.design/x/clipboard.Read(0x0?)
        /home/runner/go/pkg/mod/golang.design/x/[email protected]/clipboard.go:119 +0x85
github.com/sst/opencode/internal/components/chat.(*editorComponent).Paste(0xc000b22008)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/editor.go:332 +0x37
github.com/sst/opencode/internal/tui.appModel.executeCommand({0xbe, 0x33, 0xc000b08288, {0x0, 0x0}, {0x7a4407a39578, 0xc00050feb0}, {0x10793c8, 0xc000b22008}, {0x1079340, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:908 +0x7c9
github.com/sst/opencode/internal/tui.appModel.Update({0xbe, 0x33, 0xc000b08288, {0x0, 0x0}, {0x7a4407a39578, 0xc00050feb0}, {0x10793c8, 0xc000b22008}, {0x1079340, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:344 +0x2ac5
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0xc0004ce200, {0x1070c18?, 0xc000b0d508?}, 0xc0000e81c0)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:767 +0x16e6
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc0004ce200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1022 +0xe76
main.main()
        /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:106 +0xa98

Running with CGO_ENABLED=1 opencode doesn't change the output.

pasting with ctrl+shift+v fixes the issue

brunobmello25 avatar Jul 08 '25 19:07 brunobmello25

i'm working on this now, sorry

adamdotdevin avatar Jul 08 '25 19:07 adamdotdevin

similar issue happens when sharing a session. clipboard causes it to panic

EduardoBilk avatar Jul 08 '25 19:07 EduardoBilk

all of these issues should be resolved in https://github.com/sst/opencode/releases/tag/v0.2.9

can you guys give this a test and lmk?

adamdotdevin avatar Jul 08 '25 20:07 adamdotdevin

cc @brunobmello25 @EduardoBilk

adamdotdevin avatar Jul 08 '25 20:07 adamdotdevin

@adamdotdevin still crashing on 0.2.9 with the same error log on my end

Caught panic:

clipboard: cannot use when CGO_ENABLED=0

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:26 +0x5e
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:18 +0x13
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0xc0003d0200, {0xbd99e0, 0x106b430})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1134 +0xc5
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:871 +0xe8
panic({0xbd99e0?, 0x106b430?})
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x132
golang.design/x/clipboard.read(...)
        /home/runner/go/pkg/mod/github.com/sst/[email protected]/clipboard_nocgo.go:12
golang.design/x/clipboard.Read(0x0?)
        /home/runner/go/pkg/mod/github.com/sst/[email protected]/clipboard.go:119 +0x85
github.com/sst/opencode/internal/components/chat.(*editorComponent).Paste(0xc000bbc008)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/editor.go:332 +0x37
github.com/sst/opencode/internal/tui.appModel.executeCommand({0xbe, 0x33, 0xc000b5e288, {0x0, 0x0}, {0x73768008ba38, 0xc0003f1c60}, {0x1079468, 0xc000bbc008}, {0x10793e0, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:908 +0x7c9
github.com/sst/opencode/internal/tui.appModel.Update({0xbe, 0x33, 0xc000b5e288, {0x0, 0x0}, {0x73768008ba38, 0xc0003f1c60}, {0x1079468, 0xc000bbc008}, {0x10793e0, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:344 +0x2ac5
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0xc0003d0200, {0x1070cb8?, 0xc000b63508?}, 0xc0000283f0)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:767 +0x16e6
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc0003d0200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1022 +0xe76
main.main()
        /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:106 +0xa98

brunobmello25 avatar Jul 08 '25 21:07 brunobmello25

@brunobmello25 linux?

adamdotdevin avatar Jul 08 '25 21:07 adamdotdevin

Same here, i'm on Ubuntu 24.04

EduardoBilk avatar Jul 08 '25 21:07 EduardoBilk

my bad, i thought it was only an issue on darwin, will fix for linux as well, might be early AM tomorrow, apologies!

adamdotdevin avatar Jul 08 '25 21:07 adamdotdevin

yes! also on Ubuntu 24.04, running awesomewm with xorg

brunobmello25 avatar Jul 08 '25 21:07 brunobmello25

alright, should be fixed in https://github.com/sst/opencode/releases/tag/v0.2.12, lmk!

adamdotdevin avatar Jul 08 '25 23:07 adamdotdevin

My setup is still crashing since 0.2.6 (using 0.2.13 now). My setup:

Main OS: Windows 11 Pro 10.0.26100 Build 26100 WSL OS: Ubuntu 24.04.2 LTS (GNU/Linux 5.15.153.1-microsoft-standard-WSL2 x86_64) Ghosty: ghostty version=1.1.3 Workaround: Use something other than Ghostty (e.g., Windows Terminal).

Ghostty started crashing on 0.2.6 as 0.2.5 is working. Stacktrace for 0.2.6:

Caught panic:

clipboard: cannot use when CGO_ENABLED=0

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:26 +0x5e
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:18 +0x13
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0xc00026c200, {0xbd99e0, 0x106b3a0})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1134 +0xc5
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:871 +0xe8
panic({0xbd99e0?, 0x106b3a0?})
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x132
golang.design/x/clipboard.read(...)
        /home/runner/go/pkg/mod/golang.design/x/[email protected]/clipboard_nocgo.go:12
golang.design/x/clipboard.Read(0x0?)
        /home/runner/go/pkg/mod/golang.design/x/[email protected]/clipboard.go:119 +0x85
github.com/sst/opencode/internal/components/chat.(*editorComponent).Paste(0xc00024aa08)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/editor.go:332 +0x37
github.com/sst/opencode/internal/tui.appModel.executeCommand({0xc8, 0x2d, 0xc000b68288, {0x0, 0x0}, {0x7efd17a2afb8, 0xc001f027c0}, {0x10793c8, 0xc00024aa08}, {0x1079340, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:908 +0x7c9
github.com/sst/opencode/internal/tui.appModel.Update({0xc8, 0x2d, 0xc000b68288, {0x0, 0x0}, {0x7efd17a2afb8, 0xc001f027c0}, {0x10793c8, 0xc00024aa08}, {0x1079340, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:344 +0x2ac5
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0xc00026c200, {0x1070c18?, 0xc000b6d508?}, 0xc0002c0230)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:767 +0x16e6
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc00026c200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1022 +0xe76
main.main()
        /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:106 +0xa98

v0.2.12 Stacktrace

Caught panic:

runtime error: index out of range [-1]

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:26 +0x5e
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:18 +0x13
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0xc0005c8200, {0xc90240, 0xc000268198})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1134 +0xc5
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:871 +0xe8
panic({0xc90240?, 0xc000268198?})
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x132
golang.design/x/clipboard.read(0x1)
        /home/runner/work/opencode/opencode/packages/tui/clipboard/clipboard_linux.go:102 +0x189
golang.design/x/clipboard.Read(0x0?)
        /home/runner/work/opencode/opencode/packages/tui/clipboard/clipboard.go:119 +0x9e
github.com/sst/opencode/internal/components/chat.(*editorComponent).Paste(0xc000238a08)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/editor.go:332 +0x37
github.com/sst/opencode/internal/tui.appModel.executeCommand({0xc8, 0x2d, 0xc000b60288, {0x0, 0x0}, {0x7f810aacefb8, 0xc000d02560}, {0x107b9a8, 0xc000238a08}, {0x107b920, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:908 +0x7c9
github.com/sst/opencode/internal/tui.appModel.Update({0xc8, 0x2d, 0xc000b60288, {0x0, 0x0}, {0x7f810aacefb8, 0xc000d02560}, {0x107b9a8, 0xc000238a08}, {0x107b920, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:344 +0x2ac5
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0xc0005c8200, {0x10731f8?, 0xc000b65508?}, 0xc0005a81c0)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:767 +0x16e6
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc0005c8200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1022 +0xe76
main.main()
        /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:106 +0xa98

v0.2.13 Stacktrace

Caught panic:

runtime error: index out of range [-1]

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:26 +0x5e
runtime/debug.PrintStack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:18 +0x13
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0xc00022c400, {0xc90320, 0xc000b196f8})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1134 +0xc5
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:871 +0xe8
panic({0xc90320?, 0xc000b196f8?})
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x132
golang.design/x/clipboard.read(0x1)
        /home/runner/work/opencode/opencode/packages/tui/clipboard/clipboard_linux.go:102 +0x189
golang.design/x/clipboard.Read(0x0?)
        /home/runner/work/opencode/opencode/packages/tui/clipboard/clipboard.go:119 +0x9e
github.com/sst/opencode/internal/components/chat.(*editorComponent).Paste(0xc000bbc008)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/editor.go:342 +0x37
github.com/sst/opencode/internal/tui.appModel.executeCommand({0xc8, 0x2d, 0xc000b58288, {0x0, 0x0}, {0x7f7ffa978538, 0xc000b2fdc0}, {0x107c3f8, 0xc000bbc008}, {0x107bde0, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:949 +0x7a9
github.com/sst/opencode/internal/tui.appModel.Update({0xc8, 0x2d, 0xc000b58288, {0x0, 0x0}, {0x7f7ffa978538, 0xc000b2fdc0}, {0x107c3f8, 0xc000bbc008}, {0x107bde0, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:381 +0x2b38
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0xc00022c400, {0x10736b8?, 0xc000b5d508?}, 0xc000564380)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:767 +0x16e6
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc00022c400)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1022 +0xe76
main.main()
        /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:106 +0xa98

DrSkillIssue avatar Jul 09 '25 03:07 DrSkillIssue

I'm on Ghostty 1.1.3 too, but the same problem happens on the gnome terminal. My workaround is to keep it on v0.2.5

EduardoBilk avatar Jul 09 '25 14:07 EduardoBilk

ok, https://github.com/sst/opencode/releases/tag/v0.2.14 has some more logging and shouldn't panic anymore (but copy/paste won't work if it can't find one of the tools it's looking for to facilitate clipboard stuff on linux).

can someone upgrade and send logs my way? i consolidated TUI logs into the server logs: https://opencode.ai/docs/troubleshooting/#logs

adamdotdevin avatar Jul 09 '25 15:07 adamdotdevin

Pasting is working on v0.2.14. Also Sharing is working #792

INFO  2025-07-09T16:02:59 +40ms service=app cwd=/home/eduardo creating
INFO  2025-07-09T16:02:59 +2ms service=default version=0.2.14 args= opencode
INFO  2025-07-09T16:02:59 +0ms service=app cwd=/home/eduardo creating
INFO  2025-07-09T16:02:59 +1ms service=app git
INFO  2025-07-09T16:02:59 +0ms service=bus type=storage.write subscribing
INFO  2025-07-09T16:02:59 +0ms service=app name=bus registering service
INFO  2025-07-09T16:02:59 +0ms service=format init
INFO  2025-07-09T16:02:59 +0ms service=bus type=file.edited subscribing
INFO  2025-07-09T16:02:59 +0ms service=config.hooks init
INFO  2025-07-09T16:02:59 +0ms service=bus type=file.edited subscribing
INFO  2025-07-09T16:02:59 +0ms service=bus type=session.idle subscribing
INFO  2025-07-09T16:02:59 +0ms service=app name=lsp registering service
INFO  2025-07-09T16:02:59 +1ms service=lsp initializing
INFO  2025-07-09T16:02:59 +0ms service=app name=file.watcher registering service
INFO  2025-07-09T16:02:59 +0ms service=app name=provider registering service
INFO  2025-07-09T16:02:59 +0ms service=app name=config registering service
INFO  2025-07-09T16:02:59 +1ms service=lsp root=/home/eduardo serverID=typescript
INFO  2025-07-09T16:02:59 +1ms service=app git
INFO  2025-07-09T16:02:59 +3ms service=app name=config registering service
INFO  2025-07-09T16:02:59 +0ms service=config $schema=https://opencode.ai/config.json theme=gruvbox mcp=[object Object] loaded
INFO  2025-07-09T16:02:59 +1ms service=config $schema=https://opencode.ai/config.json theme=gruvbox mcp=[object Object] loaded
INFO  2025-07-09T16:02:59 +1ms service=models.dev refreshing
INFO  2025-07-09T16:02:59 +0ms service=provider init
INFO  2025-07-09T16:02:59 +50ms service=provider providerID=amazon-bedrock found
INFO  2025-07-09T16:02:59 +5ms service=default cmd=/home/eduardo/.cache/opencode/tui/tui-3b0yafs1. tui
INFO  2025-07-09T16:02:59 +12ms service=lsp initialized
INFO  2025-07-09T16:02:59 +7ms service=server method=GET path=/config request
INFO  2025-07-09T16:02:59 +0ms service=server duration=0 response
INFO  2025-07-09T16:02:59 +0ms service=server method=POST path=/log request
INFO  2025-07-09T16:02:59 +1ms service=server duration=1 response
INFO  2025-07-09T16:02:59 +1ms service=server method=POST path=/log request
ERROR 2025-07-09T16:02:59 +0ms service=tui error=[object Object] Failed to initialize clipboard
INFO  2025-07-09T16:02:59 +0ms service=server duration=0 response
INFO  2025-07-09T16:02:59 +0ms service=server method=POST path=/log request
WARN  2025-07-09T16:02:59 +0ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
INFO  2025-07-09T16:02:59 +1ms service=server duration=1 response
INFO  2025-07-09T16:02:59 +4ms service=server method=GET path=/file/status request
INFO  2025-07-09T16:02:59 +0ms service=server duration=0 response
INFO  2025-07-09T16:02:59 +0ms service=server method=POST path=/log request
INFO  2025-07-09T16:02:59 +0ms service=server duration=0 response
INFO  2025-07-09T16:02:59 +1ms service=server method=GET path=/event request
INFO  2025-07-09T16:02:59 +0ms service=server event connected
INFO  2025-07-09T16:02:59 +1ms service=bus type=* subscribing
INFO  2025-07-09T16:02:59 +1ms service=server duration=2 response
INFO  2025-07-09T16:02:59 +0ms service=server method=GET path=/config/providers request
INFO  2025-07-09T16:02:59 +1ms service=server duration=1 response
INFO  2025-07-09T16:02:59 +4ms service=server method=POST path=/log request
INFO  2025-07-09T16:02:59 +0ms service=server duration=0 response
INFO  2025-07-09T16:02:59 +14ms service=server method=POST path=/log request
INFO  2025-07-09T16:02:59 +0ms service=server duration=0 response
INFO  2025-07-09T16:02:59 +1ms service=server method=POST path=/log request
INFO  2025-07-09T16:02:59 +0ms service=server duration=0 response
INFO  2025-07-09T16:02:59 +7ms service=server method=POST path=/log request
INFO  2025-07-09T16:02:59 +0ms service=server duration=0 response
INFO  2025-07-09T16:02:59 +7ms service=server method=POST path=/log request
INFO  2025-07-09T16:02:59 +1ms service=server duration=1 response
INFO  2025-07-09T16:03:03 +4501ms service=server method=GET path=/session request
INFO  2025-07-09T16:03:03 +1ms service=app name=storage registering service
INFO  2025-07-09T16:03:03 +1ms service=app name=session registering service
INFO  2025-07-09T16:03:03 +1ms service=server duration=3 response
INFO  2025-07-09T16:03:08 +4670ms service=server method=GET path=/session/ses_81015b722ffenRfjgJ20DPyn9G/message request
INFO  2025-07-09T16:03:08 +2ms service=server duration=2 response
INFO  2025-07-09T16:03:08 +11ms service=server method=POST path=/log request
INFO  2025-07-09T16:03:08 +1ms service=server duration=1 response
INFO  2025-07-09T16:03:25 +16647ms service=server method=POST path=/session/ses_81015b722ffenRfjgJ20DPyn9G/share request
INFO  2025-07-09T16:03:25 +1ms service=server duration=1 response
INFO  2025-07-09T16:03:25 +10ms service=server method=POST path=/log request
WARN  2025-07-09T16:03:25 +0ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
INFO  2025-07-09T16:03:25 +0ms service=server duration=0 response
INFO  2025-07-09T16:03:27 +2039ms service=server method=POST path=/log request
WARN  2025-07-09T16:03:27 +0ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
INFO  2025-07-09T16:03:27 +0ms service=server duration=0 response
INFO  2025-07-09T16:03:27 +1ms service=server method=POST path=/log request
INFO  2025-07-09T16:03:27 +0ms service=server duration=0 response
INFO  2025-07-09T16:03:27 +2ms service=server method=POST path=/log request
WARN  2025-07-09T16:03:27 +1ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
INFO  2025-07-09T16:03:27 +0ms service=server duration=1 response
INFO  2025-07-09T16:03:27 +0ms service=server method=POST path=/log request
INFO  2025-07-09T16:03:27 +0ms service=server duration=0 response
INFO  2025-07-09T16:03:52 +25196ms service=server method=POST path=/log request
WARN  2025-07-09T16:03:52 +1ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
INFO  2025-07-09T16:03:52 +0ms service=server duration=1 response
INFO  2025-07-09T16:03:52 +0ms service=server method=POST path=/log request
INFO  2025-07-09T16:03:52 +0ms service=server duration=0 response
INFO  2025-07-09T16:03:52 +2ms service=server method=POST path=/log request
WARN  2025-07-09T16:03:52 +0ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
INFO  2025-07-09T16:03:52 +0ms service=server duration=0 response
INFO  2025-07-09T16:03:52 +1ms service=server method=POST path=/log request
INFO  2025-07-09T16:03:52 +0ms service=server duration=0 response
INFO  2025-07-09T16:04:00 +7479ms service=bus type=* unsubscribing
INFO  2025-07-09T16:04:00 +0ms service=server event disconnected
INFO  2025-07-09T16:04:00 +1ms service=app name=lsp shutdown
INFO  2025-07-09T16:04:00 +0ms service=app name=file.watcher shutdown
INFO  2025-07-09T16:04:00 +0ms service=app name=session shutdown

EduardoBilk avatar Jul 09 '25 16:07 EduardoBilk

ok, https://github.com/sst/opencode/releases/tag/v0.2.14 has some more logging and shouldn't panic anymore (but copy/paste won't work if it can't find one of the tools it's looking for to facilitate clipboard stuff on linux).

can someone upgrade and send logs my way? i consolidated TUI logs into the server logs: https://opencode.ai/docs/troubleshooting/#logs

INFO  2025-07-09T22:17:29 +135ms service=app cwd=/var/home/ki creating
INFO  2025-07-09T22:17:29 +1ms service=default version=0.2.15 args= opencode
INFO  2025-07-09T22:17:29 +0ms service=app cwd=/var/home/ki creating
INFO  2025-07-09T22:17:29 +1ms service=app git
INFO  2025-07-09T22:17:29 +0ms service=app git
INFO  2025-07-09T22:17:29 +1ms service=app name=config registering service
INFO  2025-07-09T22:17:29 +1ms service=bus type=storage.write subscribing
INFO  2025-07-09T22:17:29 +1ms service=app name=bus registering service
INFO  2025-07-09T22:17:29 +0ms service=format init
INFO  2025-07-09T22:17:29 +0ms service=bus type=file.edited subscribing
INFO  2025-07-09T22:17:29 +0ms service=config.hooks init
INFO  2025-07-09T22:17:29 +0ms service=bus type=file.edited subscribing
INFO  2025-07-09T22:17:29 +0ms service=bus type=session.idle subscribing
INFO  2025-07-09T22:17:29 +0ms service=app name=lsp registering service
INFO  2025-07-09T22:17:29 +1ms service=lsp initializing
INFO  2025-07-09T22:17:29 +0ms service=app name=file.watcher registering service
INFO  2025-07-09T22:17:29 +0ms service=app name=provider registering service
INFO  2025-07-09T22:17:29 +2ms service=app name=config registering service
INFO  2025-07-09T22:17:29 +0ms service=lsp root=/var/home/ki serverID=typescript
INFO  2025-07-09T22:17:29 +27ms service=config $schema=https://opencode.ai/config.json provider=[object Object] loaded
INFO  2025-07-09T22:17:29 +1ms service=config $schema=https://opencode.ai/config.json provider=[object Object] loaded
INFO  2025-07-09T22:17:29 +11ms service=models.dev refreshing
INFO  2025-07-09T22:17:29 +1ms service=provider init
INFO  2025-07-09T22:17:29 +26ms service=provider providerID=nahcrof found
INFO  2025-07-09T22:17:29 +0ms service=provider providerID=mistral found
INFO  2025-07-09T22:17:29 +0ms service=provider providerID=google found
INFO  2025-07-09T22:17:29 +0ms service=provider providerID=groq found
INFO  2025-07-09T22:17:29 +14ms service=default cmd=/var/home/ki/.cache/opencode/tui/tui-1asg5nwq. tui
INFO  2025-07-09T22:17:29 +127ms service=server method=GET path=/config request
INFO  2025-07-09T22:17:29 +2ms service=server duration=2 response
INFO  2025-07-09T22:17:29 +1ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:29 +3ms service=server duration=3 response
INFO  2025-07-09T22:17:29 +1ms service=server method=POST path=/log request
ERROR 2025-07-09T22:17:29 +1ms service=tui error=[object Object] Failed to initialize clipboard
INFO  2025-07-09T22:17:29 +0ms service=server duration=1 response
INFO  2025-07-09T22:17:29 +1ms service=server method=POST path=/log request
WARN  2025-07-09T22:17:29 +0ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
INFO  2025-07-09T22:17:29 +1ms service=server duration=1 response
INFO  2025-07-09T22:17:29 +8ms service=server method=GET path=/file/status request
INFO  2025-07-09T22:17:29 +2ms service=server duration=2 response
INFO  2025-07-09T22:17:29 +1ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:29 +1ms service=server duration=1 response
INFO  2025-07-09T22:17:29 +1ms service=server method=GET path=/event request
INFO  2025-07-09T22:17:29 +1ms service=server event connected
INFO  2025-07-09T22:17:29 +9ms service=bus type=* subscribing
INFO  2025-07-09T22:17:29 +4ms service=server duration=14 response
INFO  2025-07-09T22:17:29 +2ms service=server method=GET path=/config/providers request
INFO  2025-07-09T22:17:29 +3ms service=server duration=3 response
INFO  2025-07-09T22:17:29 +16ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:29 +3ms service=server duration=1 response
INFO  2025-07-09T22:17:29 +18ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:29 +2ms service=server duration=1 response
INFO  2025-07-09T22:17:29 +7ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:29 +1ms service=server duration=1 response
INFO  2025-07-09T22:17:29 +8ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:29 +2ms service=server duration=2 response
INFO  2025-07-09T22:17:29 +6ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:29 +2ms service=server duration=2 response
INFO  2025-07-09T22:17:34 +4858ms service=server method=GET path=/session request
INFO  2025-07-09T22:17:34 +3ms service=app name=storage registering service
INFO  2025-07-09T22:17:34 +3ms service=app name=session registering service
INFO  2025-07-09T22:17:34 +9ms service=server duration=15 response
INFO  2025-07-09T22:17:35 +1189ms service=server method=GET path=/session/ses_8124ac91affeBfppOSd6zPGLwz/message request
INFO  2025-07-09T22:17:35 +15ms service=server duration=15 response
INFO  2025-07-09T22:17:35 +44ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:35 +2ms service=server duration=0 response
INFO  2025-07-09T22:17:38 +3169ms service=server method=DELETE path=/session/ses_8124ac91affeBfppOSd6zPGLwz/share request
INFO  2025-07-09T22:17:38 +9ms service=bus type=storage.write publishing
INFO  2025-07-09T22:17:39 +2ms service=bus type=session.updated publishing
INFO  2025-07-09T22:17:41 +2012ms service=server duration=2022 response
INFO  2025-07-09T22:17:41 +42ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:41 +1ms service=server duration=1 response
INFO  2025-07-09T22:17:44 +3323ms service=server method=POST path=/session/ses_8124ac91affeBfppOSd6zPGLwz/share request
INFO  2025-07-09T22:17:45 +827ms service=bus type=storage.write publishing
INFO  2025-07-09T22:17:45 +1ms service=bus type=session.updated publishing
INFO  2025-07-09T22:17:45 +4ms service=bus type=storage.write publishing
INFO  2025-07-09T22:17:45 +39ms service=server duration=870 response
INFO  2025-07-09T22:17:45 +46ms service=server method=POST path=/log request
INFO  2025-07-09T22:17:45 +2ms service=server duration=1 response
INFO  2025-07-09T22:17:45 +24ms service=server method=POST path=/log request
WARN  2025-07-09T22:17:45 +1ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
INFO  2025-07-09T22:17:45 +0ms service=server duration=1 response
INFO  2025-07-09T22:17:46 +1266ms service=share key=session/info/ses_8124ac91affeBfppOSd6zPGLwz status=200 synced
INFO  2025-07-09T22:17:47 +1379ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edb53add001WgUZMquQZTpRR3 status=200 synced
INFO  2025-07-09T22:17:49 +1392ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edb53b5d001wjaIAT5xtiLaw2 status=200 synced
INFO  2025-07-09T22:17:50 +869ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edce845d001un9wcVPLkNW7XL status=200 synced
INFO  2025-07-09T22:17:51 +847ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edce8478001pRj5Pd8UkINiXZ status=200 synced
INFO  2025-07-09T22:17:51 +826ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edcef31e001j4tk8ZoRVZdDtX status=200 synced
INFO  2025-07-09T22:17:52 +890ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edcef342001QFBMzm5QyEj856 status=200 synced
INFO  2025-07-09T22:18:16 +23387ms service=bus type=* unsubscribing
INFO  2025-07-09T22:18:16 +2ms service=server event disconnected
INFO  2025-07-09T22:18:16 +26ms service=app name=lsp shutdown

Any recommended clipboard tools?

KiKaraage avatar Jul 09 '25 22:07 KiKaraage

i need to document this, but any of these three an option for you all? image

adamdotdevin avatar Jul 09 '25 23:07 adamdotdevin

Wait where is it? (To look it up)

KiKaraage avatar Jul 10 '25 00:07 KiKaraage

Wait where is it? (To look it up)

https://github.com/sst/opencode/blob/dev/packages/tui/internal/clipboard/clipboard_linux.go

adamdotdevin avatar Jul 10 '25 00:07 adamdotdevin

pasting is working fine over here now! sorry for the delay

brunobmello25 avatar Jul 10 '25 12:07 brunobmello25

pasting is working fine over here now! sorry for the delay

is the share url getting copied to your clipboard when you /share?

adamdotdevin avatar Jul 10 '25 12:07 adamdotdevin