You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sharing a session results in panic: runtime error: index out of range [-1] #792
v0.2.13 in Linux (installed via Brew btw, devs might need to add that installing Opencode via linuxbrew is supported on the docs) (Fedora 42, GNOME Wayland, Pytxis terminal)
Sometimes sharing a session (even after results from LLM is finished) causes a panic: runtime error: index out of range [-1] error. Iirc I got this error on around 3 of 4 attempts.
panic: runtime error: index out of range [-1]
goroutine 1814 [running]:end
golang.design/x/clipboard.write(0x0, {0xc0015fa000, 0x1e, 0x20})
/home/runner/work/opencode/opencode/packages/tui/clipboard/clipboard_linux.go:171 +0x64d
golang.design/x/clipboard.Write(0x18?, {0xc0015fa000?, 0x1e?, 0xc0003ad76c?})
dir/home/runner/work/opencode/opencode/packages/tui/clipboard/clipboard.go:139 +0xc6
github.com/sst/opencode/internal/tui.appModel.executeCommand.(*App).SetClipboard.func4()
/home/runner/work/opencode/opencode/packages/tui/internal/app/app.go:154 +0x2d
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop.func2()
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/tea.go:715 +0x64
created by github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop in go
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/tea.go:708 +0x9b1
Related to issue #774 about clipboard, especially this comment:
similar issue happens when sharing a session. clipboard causes it to panic
Activity
thdxr commentedon Jul 9, 2025
should be fixed in latest?
KiKaraage commentedon Jul 9, 2025
Fixed yeah, thank you! (It still doesn't copy the link to clipboard, but that's a different issue and this particular one is already fixed)