Panic when restoring a session #709

Closed
opened 2026-02-16 17:27:59 -05:00 by yindo · 4 comments
Owner

Originally created by @alandotcom on GitHub (Jul 15, 2025).

Originally assigned to: @thdxr on GitHub.

❯ opencode --version
0.3.7

❯ opencode run hey

█▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀
█░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀
▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀

@ anthropic/claude-sonnet-4-20250514

Hello! I'm here to help you with software engineering tasks in your monorepo. What would you like to work on today?

During a session this happened:

Caught panic:

interface conversion: interface {} is nil, not map[string]interface {}

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:2
6 +0x64
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0x14000572200, {0x103a02380, 0x140010ee240})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1139 +0x10c
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:872 +0xdc
panic({0x103a02380?, 0x140010ee240?})
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x124
github.com/sst/opencode/internal/components/chat.renderToolDetails(_, {{0x1400112edc7, 0x1e}, {0x1400112ee67, 0x1e}, {0x1400112edf4, 0x1e}, {0x1400112ee21, 0x1e}, {{0x140008af0eb, ...}, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/message.go:340 +0x1ec8
github.com/sst/opencode/internal/components/chat.(*messagesComponent).renderView(0x14000b3a008, 0x43)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:298 +0x1854
github.com/sst/opencode/internal/components/chat.(*messagesComponent).Update(0x14000b3a008, {0x103a5c380, 0x14001430708})
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:111 +0x460
github.com/sst/opencode/internal/tui.appModel.Update({0x47, 0x2a, 0x140001e6588, {0x0, 0x0}, {0x128f0f3b8, 0x1400046c020}, {0x103ad4fe0, 0x14000b46008}, {0x103ad4c38, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:541 +0x299c
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0x14000572200, {0x103acc710?, 0x14000b56a88?}, 0x140001c0380)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:768 +0x1438
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0x14000572200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1024 +0xb10
main.main()
        /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:110 +0x7c0

If I try to restore that session:

❯ opencode
Caught panic:

interface conversion: interface {} is nil, not map[string]interface {}

Restoring terminal...
Originally created by @alandotcom on GitHub (Jul 15, 2025). Originally assigned to: @thdxr on GitHub. ❯ opencode --version 0.3.7 ❯ opencode run hey █▀▀█ █▀▀█ █▀▀ █▀▀▄ █▀▀ █▀▀█ █▀▀▄ █▀▀ █░░█ █░░█ █▀▀ █░░█ █░░ █░░█ █░░█ █▀▀ ▀▀▀▀ █▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀▀ ▀▀▀ ▀▀▀ @ anthropic/claude-sonnet-4-20250514 Hello! I'm here to help you with software engineering tasks in your monorepo. What would you like to work on today? During a session this happened: ``` Caught panic: interface conversion: interface {} is nil, not map[string]interface {} Restoring terminal... goroutine 1 [running]: runtime/debug.Stack() /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/debug/stack.go:2 6 +0x64 github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0x14000572200, {0x103a02380, 0x140010ee240}) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1139 +0x10c github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2() /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:872 +0xdc panic({0x103a02380?, 0x140010ee240?}) /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x124 github.com/sst/opencode/internal/components/chat.renderToolDetails(_, {{0x1400112edc7, 0x1e}, {0x1400112ee67, 0x1e}, {0x1400112edf4, 0x1e}, {0x1400112ee21, 0x1e}, {{0x140008af0eb, ...}, ...}, ...}, ...) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/message.go:340 +0x1ec8 github.com/sst/opencode/internal/components/chat.(*messagesComponent).renderView(0x14000b3a008, 0x43) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:298 +0x1854 github.com/sst/opencode/internal/components/chat.(*messagesComponent).Update(0x14000b3a008, {0x103a5c380, 0x14001430708}) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:111 +0x460 github.com/sst/opencode/internal/tui.appModel.Update({0x47, 0x2a, 0x140001e6588, {0x0, 0x0}, {0x128f0f3b8, 0x1400046c020}, {0x103ad4fe0, 0x14000b46008}, {0x103ad4c38, ...}, ...}, ...) /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:541 +0x299c github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0x14000572200, {0x103acc710?, 0x14000b56a88?}, 0x140001c0380) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:768 +0x1438 github.com/charmbracelet/bubbletea/v2.(*Program).Run(0x14000572200) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1024 +0xb10 main.main() /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:110 +0x7c0 ``` If I try to restore that session: ``` ❯ opencode Caught panic: interface conversion: interface {} is nil, not map[string]interface {} Restoring terminal... ```
yindo closed this issue 2026-02-16 17:28:00 -05:00
Author
Owner

@quiint commented on GitHub (Jul 15, 2025):

following up, i'm getting the same thing when using opencode. i send a message, and while it's working on a file presumably (after creating the todo list), it comes out with these crashes.

Caught panic:

interface conversion: interface {} is nil, not map[string]interface {}

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(0x140001a4200, {0x10578e380, 0x1400175fb00})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1139 +0x10c
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:872 +0xdc
panic({0x10578e380?, 0x1400175fb00?})
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x124
github.com/sst/opencode/internal/components/chat.renderToolDetails(_, {{0x14001335007, 0x1e}, {0x140013350a8, 0x20}, {0x14001335034, 0x1e}, {0x14001335061, 0x1e}, {{0x1400133700b, ...}, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/message.go:340 +0x1ec8
github.com/sst/opencode/internal/components/chat.(*messagesComponent).renderView(0x14000bac008, 0x50)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:298 +0x1854
github.com/sst/opencode/internal/components/chat.(*messagesComponent).Update(0x14000bac008, {0x1057e8380, 0x14001352008})
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:111 +0x460
github.com/sst/opencode/internal/tui.appModel.Update({0xff, 0x48, 0x140004c62c8, {0x0, 0x0}, {0x14cc1b920, 0x14000414380}, {0x105860fe0, 0x14000bae008}, {0x105860c38, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:541 +0x299c
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0x140001a4200, {0x105858710?, 0x140004caa88?}, 0x14000418000)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:768 +0x1438
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0x140001a4200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1024 +0xb10
main.main()
        /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:110 +0x7c0
❯ opencode
Caught panic:

interface conversion: interface {} is nil, not map[string]interface {}

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(0x140001ac200, {0x103812380, 0x140013346f0})
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1139 +0x10c
github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:872 +0xdc
panic({0x103812380?, 0x140013346f0?})
        /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x124
github.com/sst/opencode/internal/components/chat.renderToolDetails(_, {{0x14000bdb007, 0x1e}, {0x14000bdb0a8, 0x20}, {0x14000bdb034, 0x1e}, {0x14000bdb061, 0x1e}, {{0x14000c1100b, ...}, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/message.go:340 +0x1ec8
github.com/sst/opencode/internal/components/chat.(*messagesComponent).renderView(0x14000b96008, 0x50)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:298 +0x1854
github.com/sst/opencode/internal/components/chat.(*messagesComponent).Update(0x14000b96008, {0x10386c380, 0x14000896a88})
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:111 +0x460
github.com/sst/opencode/internal/tui.appModel.Update({0xff, 0x48, 0x140004feb08, {0x0, 0x0}, {0x12ac593d8, 0x14000280600}, {0x1038e4fe0, 0x14000b98008}, {0x1038e4c38, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:541 +0x299c
github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0x140001ac200, {0x1038dc710?, 0x14000518a88?}, 0x14000034070)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:768 +0x1438
github.com/charmbracelet/bubbletea/v2.(*Program).Run(0x140001ac200)
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1024 +0xb10
main.main()
        /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:110 +0x7c0
@quiint commented on GitHub (Jul 15, 2025): following up, i'm getting the same thing when using opencode. i send a message, and while it's working on a file presumably (after creating the todo list), it comes out with these crashes. ``` Caught panic: interface conversion: interface {} is nil, not map[string]interface {} 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(0x140001a4200, {0x10578e380, 0x1400175fb00}) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1139 +0x10c github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2() /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:872 +0xdc panic({0x10578e380?, 0x1400175fb00?}) /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x124 github.com/sst/opencode/internal/components/chat.renderToolDetails(_, {{0x14001335007, 0x1e}, {0x140013350a8, 0x20}, {0x14001335034, 0x1e}, {0x14001335061, 0x1e}, {{0x1400133700b, ...}, ...}, ...}, ...) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/message.go:340 +0x1ec8 github.com/sst/opencode/internal/components/chat.(*messagesComponent).renderView(0x14000bac008, 0x50) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:298 +0x1854 github.com/sst/opencode/internal/components/chat.(*messagesComponent).Update(0x14000bac008, {0x1057e8380, 0x14001352008}) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:111 +0x460 github.com/sst/opencode/internal/tui.appModel.Update({0xff, 0x48, 0x140004c62c8, {0x0, 0x0}, {0x14cc1b920, 0x14000414380}, {0x105860fe0, 0x14000bae008}, {0x105860c38, ...}, ...}, ...) /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:541 +0x299c github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0x140001a4200, {0x105858710?, 0x140004caa88?}, 0x14000418000) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:768 +0x1438 github.com/charmbracelet/bubbletea/v2.(*Program).Run(0x140001a4200) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1024 +0xb10 main.main() /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:110 +0x7c0 ``` ``` ❯ opencode Caught panic: interface conversion: interface {} is nil, not map[string]interface {} 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(0x140001ac200, {0x103812380, 0x140013346f0}) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1139 +0x10c github.com/charmbracelet/bubbletea/v2.(*Program).Run.func2() /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:872 +0xdc panic({0x103812380?, 0x140013346f0?}) /opt/hostedtoolcache/go/1.24.4/x64/src/runtime/panic.go:792 +0x124 github.com/sst/opencode/internal/components/chat.renderToolDetails(_, {{0x14000bdb007, 0x1e}, {0x14000bdb0a8, 0x20}, {0x14000bdb034, 0x1e}, {0x14000bdb061, 0x1e}, {{0x14000c1100b, ...}, ...}, ...}, ...) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/message.go:340 +0x1ec8 github.com/sst/opencode/internal/components/chat.(*messagesComponent).renderView(0x14000b96008, 0x50) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:298 +0x1854 github.com/sst/opencode/internal/components/chat.(*messagesComponent).Update(0x14000b96008, {0x10386c380, 0x14000896a88}) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:111 +0x460 github.com/sst/opencode/internal/tui.appModel.Update({0xff, 0x48, 0x140004feb08, {0x0, 0x0}, {0x12ac593d8, 0x14000280600}, {0x1038e4fe0, 0x14000b98008}, {0x1038e4c38, ...}, ...}, ...) /home/runner/work/opencode/opencode/packages/tui/internal/tui/tui.go:541 +0x299c github.com/charmbracelet/bubbletea/v2.(*Program).eventLoop(0x140001ac200, {0x1038dc710?, 0x14000518a88?}, 0x14000034070) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:768 +0x1438 github.com/charmbracelet/bubbletea/v2.(*Program).Run(0x140001ac200) /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:1024 +0xb10 main.main() /home/runner/work/opencode/opencode/packages/tui/cmd/opencode/main.go:110 +0x7c0 ```
Author
Owner

@thdxr commented on GitHub (Jul 16, 2025):

is this still happening on latest?

@thdxr commented on GitHub (Jul 16, 2025): is this still happening on latest?
Author
Owner

@alandotcom commented on GitHub (Jul 31, 2025):

Haven't seen this happening recently

@alandotcom commented on GitHub (Jul 31, 2025): Haven't seen this happening recently
Author
Owner

@rekram1-node commented on GitHub (Aug 19, 2025):

Closing since this appears to be fixed

@rekram1-node commented on GitHub (Aug 19, 2025): Closing since this appears to be fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#709