Panic on file write #1134

Closed
opened 2026-02-16 17:29:34 -05:00 by yindo · 0 comments
Owner

Originally created by @papar123 on GitHub (Aug 6, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Any LLM trying to rewrite the file leads to

Caught panic:

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

Restoring terminal...

goroutine 438 [running]:
runtime/debug.Stack()
        /opt/hostedtoolcache/go/1.24.5/x64/src/runtime/debug/stack.go:26 +0x64
github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0x14000245200, {0x100e558c0, 0x140022dad80})
        /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).handleCommands.func1.1.1()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:479 +0x40
panic({0x100e558c0?, 0x140022dad80?})
        /opt/hostedtoolcache/go/1.24.5/x64/src/runtime/panic.go:792 +0x124
github.com/sst/opencode/internal/components/chat.renderToolDetails(_, {{0x140053bd007, 0x1e}, {0x140053bd0a8, 0xc}, {0x140053bd034, 0x1e}, {0x140053bd061, 0x1e}, {{0x140053bf00b, ...}, ...}, ...}, ...)
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/message.go:361 +0x26ac
github.com/sst/opencode/internal/components/chat.(*messagesComponent).renderView.func2()
        /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:495 +0x39e4
github.com/charmbracelet/bubbletea/v2.(*Program).handleCommands.func1.1()
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:484 +0x64
created by github.com/charmbracelet/bubbletea/v2.(*Program).handleCommands.func1 in goroutine 89
        /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:474 +0x10c

in the latest 0.3.131

Originally created by @papar123 on GitHub (Aug 6, 2025). Originally assigned to: @adamdotdevin on GitHub. Any LLM trying to rewrite the file leads to ```bash Caught panic: interface conversion: interface {} is nil, not map[string]interface {} Restoring terminal... goroutine 438 [running]: runtime/debug.Stack() /opt/hostedtoolcache/go/1.24.5/x64/src/runtime/debug/stack.go:26 +0x64 github.com/charmbracelet/bubbletea/v2.(*Program).recoverFromPanic(0x14000245200, {0x100e558c0, 0x140022dad80}) /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).handleCommands.func1.1.1() /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:479 +0x40 panic({0x100e558c0?, 0x140022dad80?}) /opt/hostedtoolcache/go/1.24.5/x64/src/runtime/panic.go:792 +0x124 github.com/sst/opencode/internal/components/chat.renderToolDetails(_, {{0x140053bd007, 0x1e}, {0x140053bd0a8, 0xc}, {0x140053bd034, 0x1e}, {0x140053bd061, 0x1e}, {{0x140053bf00b, ...}, ...}, ...}, ...) /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/message.go:361 +0x26ac github.com/sst/opencode/internal/components/chat.(*messagesComponent).renderView.func2() /home/runner/work/opencode/opencode/packages/tui/internal/components/chat/messages.go:495 +0x39e4 github.com/charmbracelet/bubbletea/v2.(*Program).handleCommands.func1.1() /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:484 +0x64 created by github.com/charmbracelet/bubbletea/v2.(*Program).handleCommands.func1 in goroutine 89 /home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea/v2@v2.0.0-beta.4/tea.go:474 +0x10c ``` in the latest 0.3.131
yindo closed this issue 2026-02-16 17:29:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1134