Skip to content

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

Closed

Description

@brunobmello25

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/v2@v2.0.0-beta.3/tea.go:1134 +0xc5
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/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/clipboard@v0.7.1/clipboard_nocgo.go:12
golang.design/x/clipboard.Read(0x0?)
        /home/runner/go/pkg/mod/golang.design/x/clipboard@v0.7.1/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/v2@v2.0.0-beta.3/tea.go:767 +0x16e6
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc0004ce200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/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

Activity

  1. changed the title [-]pasting with ctrl+v crashes the program.[/-] [+][0.2.6] pasting with ctrl+v crashes the program.[/+] on Jul 8, 2025
  2. adamdotdevin commented on Jul 8, 2025

    @adamdotdevin
    Member

    i'm working on this now, sorry

  3. self-assigned this
    on Jul 8, 2025
  4. EduardoBilk commented on Jul 8, 2025

    @EduardoBilk

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

  5. adamdotdevin commented on Jul 8, 2025

    @adamdotdevin
    Member

    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?

  6. adamdotdevin commented on Jul 8, 2025

    @adamdotdevin
    Member
  7. brunobmello25 commented on Jul 8, 2025

    @brunobmello25
    Author

    @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/v2@v2.0.0-beta.3/tea.go:1134 +0xc5
    github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
            /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/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/clipboard@v0.0.0-20250708194754-36e9fc12a4e8/clipboard_nocgo.go:12
    golang.design/x/clipboard.Read(0x0?)
            /home/runner/go/pkg/mod/github.com/sst/clipboard@v0.0.0-20250708194754-36e9fc12a4e8/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/v2@v2.0.0-beta.3/tea.go:767 +0x16e6
    github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc0003d0200)
            /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/tea.go:1022 +0xe76
    main.main()
            /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:106 +0xa98
    
  8. adamdotdevin commented on Jul 8, 2025

    @adamdotdevin
    Member
  9. EduardoBilk commented on Jul 8, 2025

    @EduardoBilk

    Same here, i'm on Ubuntu 24.04

  10. adamdotdevin commented on Jul 8, 2025

    @adamdotdevin
    Member

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

  11. brunobmello25 commented on Jul 8, 2025

    @brunobmello25
    Author

    yes! also on Ubuntu 24.04, running awesomewm with xorg

  12. adamdotdevin commented on Jul 8, 2025

    @adamdotdevin
    Member
  13. DrSkillIssue commented on Jul 9, 2025

    @DrSkillIssue

    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/v2@v2.0.0-beta.3/tea.go:1134 +0xc5
    github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
            /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/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/clipboard@v0.7.1/clipboard_nocgo.go:12
    golang.design/x/clipboard.Read(0x0?)
            /home/runner/go/pkg/mod/golang.design/x/clipboard@v0.7.1/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/v2@v2.0.0-beta.3/tea.go:767 +0x16e6
    github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc00026c200)
            /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/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/v2@v2.0.0-beta.3/tea.go:1134 +0xc5
    github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
            /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/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/v2@v2.0.0-beta.3/tea.go:767 +0x16e6
    github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc0005c8200)
            /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/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/v2@v2.0.0-beta.3/tea.go:1134 +0xc5
    github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
            /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/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/v2@v2.0.0-beta.3/tea.go:767 +0x16e6
    github.com/charmbracelet/bubbletea/v2.(*Program).Run(0xc00022c400)
            /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.3/tea.go:1022 +0xe76
    main.main()
            /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:106 +0xa98
    
  14. EduardoBilk commented on Jul 9, 2025

    @EduardoBilk

    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

  15. adamdotdevin commented on Jul 9, 2025

    @adamdotdevin
    Member

    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

  16. EduardoBilk commented on Jul 9, 2025

    @EduardoBilk

    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
    
  17. KiKaraage commented on Jul 9, 2025

    @KiKaraage

    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?

  18. adamdotdevin commented on Jul 9, 2025

    @adamdotdevin
    Member

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

  19. KiKaraage commented on Jul 10, 2025

    @KiKaraage

    Wait where is it? (To look it up)

  20. adamdotdevin commented on Jul 10, 2025

    @adamdotdevin
    Member
  21. brunobmello25 commented on Jul 10, 2025

    @brunobmello25
    Author

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

  22. adamdotdevin commented on Jul 10, 2025

    @adamdotdevin
    Member

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

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

  23. brunobmello25 commented on Jul 10, 2025

    @brunobmello25
    Author

    @adamdotdevin tested now and it is, on version 0.2.21

  24. KiKaraage commented on Jul 10, 2025

    @KiKaraage

    Previously when I share the link and try to paste, the pasted text would be previous entry of the clipboard.
    Now the pasted text would be blank.
    I'm on 0.2.23 on Fedora 42 + GNOME Wayland + Ptyxis.
    Any utility I should install first?

    Here's the log of me opening opencode > opening session > try to share the link but seems like opencode doesn't recognize any clipboard utility.

    INFO  2025-07-10T17:23:12 +135ms service=app cwd=/var/home/ki creating
    INFO  2025-07-10T17:23:12 +1ms service=default version=0.2.23 args= opencode
    INFO  2025-07-10T17:23:12 +1ms service=app cwd=/var/home/ki creating
    INFO  2025-07-10T17:23:12 +5ms service=app git
    INFO  2025-07-10T17:23:12 +0ms service=app git
    INFO  2025-07-10T17:23:12 +1ms service=app name=config registering service
    INFO  2025-07-10T17:23:12 +2ms service=bus type=storage.write subscribing
    INFO  2025-07-10T17:23:12 +0ms service=app name=bus registering service
    INFO  2025-07-10T17:23:12 +0ms service=format init
    INFO  2025-07-10T17:23:12 +0ms service=bus type=file.edited subscribing
    INFO  2025-07-10T17:23:12 +0ms service=config.hooks init
    INFO  2025-07-10T17:23:12 +0ms service=bus type=file.edited subscribing
    INFO  2025-07-10T17:23:12 +0ms service=bus type=session.idle subscribing
    INFO  2025-07-10T17:23:12 +0ms service=app name=lsp registering service
    INFO  2025-07-10T17:23:12 +1ms service=app name=file.watcher registering service
    INFO  2025-07-10T17:23:12 +0ms service=app name=provider registering service
    INFO  2025-07-10T17:23:12 +1ms service=app name=config registering service
    INFO  2025-07-10T17:23:12 +8ms service=config $schema=https://opencode.ai/config.json provider=[object Object] loaded
    INFO  2025-07-10T17:23:12 +1ms service=config $schema=https://opencode.ai/config.json provider=[object Object] loaded
    INFO  2025-07-10T17:23:12 +17ms service=models.dev refreshing
    INFO  2025-07-10T17:23:12 +1ms service=provider init
    INFO  2025-07-10T17:23:12 +20ms service=provider providerID=nahcrof found
    INFO  2025-07-10T17:23:12 +0ms service=provider providerID=mistral found
    INFO  2025-07-10T17:23:12 +0ms service=provider providerID=google found
    INFO  2025-07-10T17:23:12 +0ms service=provider providerID=groq found
    INFO  2025-07-10T17:23:12 +9ms service=default cmd=/var/home/ki/.cache/opencode/tui/tui-k8n3zsqz. tui
    INFO  2025-07-10T17:23:12 +1ms service=app name=mode registering service
    INFO  2025-07-10T17:23:12 +60ms service=server method=GET path=/config request
    INFO  2025-07-10T17:23:12 +1ms service=server duration=1 response
    INFO  2025-07-10T17:23:12 +0ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:12 +3ms service=server duration=3 response
    INFO  2025-07-10T17:23:12 +2ms service=server method=POST path=/log request
    WARN  2025-07-10T17:23:12 +1ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
    INFO  2025-07-10T17:23:12 +0ms service=server duration=1 response
    INFO  2025-07-10T17:23:12 +0ms service=server method=POST path=/log request
    ERROR 2025-07-10T17:23:12 +1ms service=tui error=[object Object] Failed to initialize clipboard
    INFO  2025-07-10T17:23:12 +0ms service=server duration=1 response
    INFO  2025-07-10T17:23:12 +5ms service=server method=GET path=/file/status request
    INFO  2025-07-10T17:23:12 +1ms service=server duration=1 response
    INFO  2025-07-10T17:23:12 +1ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:12 +1ms service=server duration=1 response
    INFO  2025-07-10T17:23:12 +0ms service=server method=GET path=/event request
    INFO  2025-07-10T17:23:12 +0ms service=server event connected
    INFO  2025-07-10T17:23:12 +5ms service=bus type=* subscribing
    INFO  2025-07-10T17:23:12 +3ms service=server duration=8 response
    INFO  2025-07-10T17:23:12 +2ms service=server method=GET path=/config/providers request
    INFO  2025-07-10T17:23:12 +3ms service=server duration=2 response
    INFO  2025-07-10T17:23:12 +13ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:12 +1ms service=server duration=1 response
    INFO  2025-07-10T17:23:12 +11ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:12 +1ms service=server duration=1 response
    INFO  2025-07-10T17:23:12 +14ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:12 +0ms service=server duration=0 response
    INFO  2025-07-10T17:23:12 +4ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:12 +0ms service=server duration=0 response
    INFO  2025-07-10T17:23:12 +7ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:12 +1ms service=server duration=1 response
    INFO  2025-07-10T17:23:15 +3060ms service=server method=GET path=/session request
    INFO  2025-07-10T17:23:15 +2ms service=app name=storage registering service
    INFO  2025-07-10T17:23:15 +1ms service=app name=session registering service
    INFO  2025-07-10T17:23:15 +3ms service=server duration=6 response
    INFO  2025-07-10T17:23:17 +1558ms service=server method=GET path=/session/ses_8124ac91affeBfppOSd6zPGLwz/message request
    INFO  2025-07-10T17:23:17 +4ms service=server duration=4 response
    INFO  2025-07-10T17:23:17 +32ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:17 +1ms service=server duration=1 response
    INFO  2025-07-10T17:23:19 +2307ms service=server method=POST path=/session/ses_8124ac91affeBfppOSd6zPGLwz/share request
    INFO  2025-07-10T17:23:20 +835ms service=bus type=storage.write publishing
    INFO  2025-07-10T17:23:20 +1ms service=bus type=session.updated publishing
    INFO  2025-07-10T17:23:20 +1ms service=bus type=storage.write publishing
    INFO  2025-07-10T17:23:20 +2ms service=server duration=839 response
    INFO  2025-07-10T17:23:20 +24ms service=server method=POST path=/log request
    INFO  2025-07-10T17:23:20 +0ms service=server duration=0 response
    INFO  2025-07-10T17:23:20 +14ms service=server method=POST path=/log request
    WARN  2025-07-10T17:23:20 +0ms service=tui No clipboard utility found on system. Copy/paste functionality will be disabled.
    INFO  2025-07-10T17:23:20 +0ms service=server duration=0 response
    INFO  2025-07-10T17:23:21 +1286ms service=share key=session/info/ses_8124ac91affeBfppOSd6zPGLwz status=200 synced
    INFO  2025-07-10T17:23:22 +791ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edb53add001WgUZMquQZTpRR3 status=200 synced
    INFO  2025-07-10T17:23:23 +799ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edb53b5d001wjaIAT5xtiLaw2 status=200 synced
    INFO  2025-07-10T17:23:24 +811ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edce845d001un9wcVPLkNW7XL status=200 synced
    INFO  2025-07-10T17:23:24 +794ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edce8478001pRj5Pd8UkINiXZ status=200 synced
    INFO  2025-07-10T17:23:25 +921ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edcef31e001j4tk8ZoRVZdDtX status=200 synced
    INFO  2025-07-10T17:23:26 +833ms service=share key=session/message/ses_8124ac91affeBfppOSd6zPGLwz/msg_7edcef342001QFBMzm5QyEj856 status=200 synced
    
  25. adamdotdevin commented on Jul 10, 2025

    @adamdotdevin
    Member
  26. itamarro commented on Aug 3, 2025

    @itamarro

    I have what seems like a similar issue (maybe?) happening to me now on MacOS X, using Kitty. Paste worked fine and then all of a sudden ... OpenCode hangs when I do. Nothing that I can think of has changed. It only happens on multi-line paste (the kind that gets embedded in the buffer as a special block - for example not a single word). Doesn't matter if the pasted content has formatting or not. Kept happening after kill + run-over, including a new terminal session. Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions