opencode
opencode copied to clipboard
opentui: TUI crashes after successful native OpenAI account connection (TypeError: local.agent.current() is undefined)
Description
Description
After connecting my OpenAI account using the native authentication flow, the OpenAI authorization completes successfully in the browser. However, after returning to the opencode TUI, the application crashes with a fatal error and becomes unusable.
Expected behavior
The TUI should continue working normally and show the connected OpenAI account.
Actual behavior
The TUI crashes with a fatal error immediately after authentication completes.
Error output / stack trace
TypeError: undefined is not an object (evaluating 'local.agent.current().name')
at <anonymous> (src/cli/cmd/tui/component/prompt/index.tsx:840:75)
at <anonymous> (.../node_modules/@opentui/solid/index.js:148:62)
at runComputation (.../solid-js/dist/dev.js:742:22)
at updateComputation (.../solid-js/dist/dev.js:724:3)
at runTop (.../solid-js/dist/dev.js:833:7)
at runUserEffects (.../solid-js/dist/dev.js:928:18)
at runUpdates (.../solid-js/dist/dev.js:849:17)
at completeUpdates (.../solid-js/dist/dev.js:900:17)
at setStore (.../solid-js/store/dist/dev.js:221:5)
at processTicksAndRejections (native:7:39)
Environment
- OS: Arch Linux
- Node.js: (please fill if known)
- Bun: 1.3.4
- Node.js: v25.2.1
- Shell: fish
Additional context
- The OpenAI login succeeds (account is authorized on the OpenAI website).
- The crash happens only after returning to the TUI.
- Workaround: selecting "Reset TUI" fixes the issue.
Screenshot
Plugins
oh-my-opencode
OpenCode version
opencode version: 1.1.11
Steps to reproduce
- Launch
opencode - Start native OpenAI account connection from the TUI
/connect - Complete authentication successfully in the OpenAI browser flow
- Return to the opencode TUI
Screenshot and/or share link
Operating System
Arch Linux
Terminal
Ghossty