opencode
opencode copied to clipboard
opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name')
Description
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/.bun/@[email protected]+897ebc1644d3edd0/node_modules/@opentui/solid/index.js:148:62)
at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
at runTop (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:833:7)
at runUserEffects (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:928:18)
at runUpdates (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:849:17)
at completeUpdates (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:900:17)
at runUpdates (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:850:5)
at setStore (../../node_modules/.bun/[email protected]/node_modules/solid-js/store/dist/dev.js:221:5)...
Plugins
No response
OpenCode version
1.1.11
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
This issue appears to be a duplicate of existing issues with the same error. Please check:
- #7628: opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name') - When login copilot - Exact same error and stack trace, reported to occur during Copilot login
- #7550: opentui: TUI crashes after successful native OpenAI account connection (TypeError: local.agent.current() is undefined) - Same root cause, appears to occur after authentication completes
All three issues stem from local.agent.current() being undefined at src/cli/cmd/tui/component/prompt/index.tsx:840:75.
Feel free to ignore if your issue has different triggering conditions.
Workaround for time being: https://github.com/anomalyco/opencode/issues/7550#issuecomment-3731950685