GeezerVison is showing github.com — opentui: fatal: undefined is not an object (evaluating 'agents()[0].name') · Issue #5830 · anomalyco/opencode
opentui: fatal: undefined is not an object (evaluating 'agents()[0].name') #5830
Labels
bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui Description
Description
TypeError: undefined is not an object (evaluating 'agents()[0].name')
at <anonymous> (src/cli/cmd/tui/context/local.tsx:53:27)
at init (src/cli/cmd/tui/context/local.tsx:50:19)
at provider (src/cli/cmd/tui/context/helper.tsx:8:26)
at untrack (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:475:12)
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 devComponent (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:593:3)
at children (src/cli/cmd/tui/context/helper.tsx:18:24)
at <anonymous> (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:1057:29)
at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)...
OpenCode version
1.0.174
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Activity
github-actions commented on Dec 20, 2025
This issue might be a duplicate of existing issues. Please check:
Both issues suggest that the problem is in src/cli/cmd/tui/context/local.tsx where agents()[0].name is accessed without checking if agents array is empty or defined. This happens when no agents are available to the current session.
Feel free to ignore if your specific case is different from these scenarios (e.g., remote connection or disabled agents).
rekram1-node commented on Dec 20, 2025
@tsopito can u share:
opencode debug config
rekram1-node commented on Dec 20, 2025
It looks like all ur primary agents are disabled, Ill adjust the code so we have cleaner error for this but this is a config issue on ur end
rekram1-node commented on Dec 20, 2025
Should fix it (as in better error):
d61b04a
Metadata
Metadata
bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui Development
No branches or pull requestsIssue actions