Repository navigation
Closed
Description
Using mac os.
Using opencode v0.3.54 installed via curl
Using Copilot (initial configuration) and local Ollama (project configuration though it looks like copilot is still accessible)
I've deleted all existent sessions, then created a new one. Once in the new session I tried to send a simple prompt and got:
Caught panic:
runtime error: invalid memory address or nil pointer dereference
Restoring terminal...
goroutine 1 [running]:
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:26 +0x64
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0x140001a7000, {0x1018a15e0, 0x101ec7cf0})
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1139 +0x10c
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:872 +0xdc
panic({0x1018a15e0?, 0x101ec7cf0?})
/opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x124
github.com/sst/opencode/internal/app.Prompt.ToMessage({{0x1400300ca00, 0xa8}, {0x140000d4420, 0x1, 0x1}}, {0x14002f4d4c0, 0x1e}, {0x140032b4797, 0x1e})
/home/runner/work/opencode/opencode/packages/tui/internal/app/prompt.go:69 +0x4f8
github.com/sst/opencode/internal/app.(*App).SendPrompt(0x1400013eb08, {0x10197c598, 0x101f2a420}, {{0x1400300ca00, 0xa8}, {0x140000d4420, 0x1, 0x1}})
/home/runner/work/opencode/opencode/packages/tui/internal/app/app.go:473 +0x1d0
github.com/sst/opencode/internal/tui.appModel.Update({0x74, 0x18, 0x1400013eb08, {0x0, 0x0}, {0x148d0fe38, 0x14000256e00}, {0x101981ea0, 0x14001f08008}, {0x101980a20, ...}, ...}, ...)
/home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:335 +0x21b0
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0x140001a7000, {0x101979410?, 0x14001f16a88?}, 0x140000e20e0)
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:768 +0x1438
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0x140001a7000)
/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/[email protected]/tea.go:1024 +0xb10
main.main()
/home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:111 +0x778
Restart didn't help. Now it always crashes. Even after I change models or folders.
I love this project!
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Deleted a few sessions and now opencode crashes on request[/-][+]Deleted a few sessions and now opencode crashes on prompt[/+]thdxr commentedon Jul 22, 2025
does deleting
~/.local/share/opencodefix anything? not sure what's going on hereadamdotdevin commentedon Jul 22, 2025
i made this code more defensive, but confused how you got in this state; did your prompt have any attachments in it? (files)
adamdotdevin commentedon Jul 23, 2025
@demosten after upgrading to latest, is this fixed for you?
demosten commentedon Jul 24, 2025
@adamdotdevin after the update it no longer crashes! I did not delete
~/.local/share/opencode.rekram1-node commentedon Dec 28, 2025
[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
phase 5: remove migration repair flow (anomalyco#1215)