You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name') #16982
TypeError: undefined is not an object (evaluating 'local.agent.current().name')
at <anonymous> (src/cli/cmd/tui/component/prompt/index.tsx:895:75)
at <anonymous> (../../node_modules/.bun/@[email protected]+32dd883c17663c11/node_modules/@opentui/solid/index.js:150: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 <anonymous> (src/cli/cmd/tui/context/sync.tsx:276:11)
at processTicksAndRejections (native:7:39)...
There are also many earlier reports of this same error (e.g. #11401, #11135, #10984). Please search existing issues before filing to avoid duplicates.
If you believe this is a distinct occurrence or has a different root cause/reproduction scenario, please add steps to reproduce and system information (OS, terminal) to help distinguish it.
Difference from #17015: this also fixes the state-management side in packages/opencode/src/cli/cmd/tui/context/local.tsx by handling empty initialization, stale agentStore.current, and empty-list navigation, instead of only removing the non-null assertion and adding call-site guards.
Activity
github-actions commentedon Mar 11, 2026
This issue might be a duplicate of existing issues. Please check:
undefined is not an object (evaluating 'local.agent.current().name')with identical stack traceThere are also many earlier reports of this same error (e.g. #11401, #11135, #10984). Please search existing issues before filing to avoid duplicates.
If you believe this is a distinct occurrence or has a different root cause/reproduction scenario, please add steps to reproduce and system information (OS, terminal) to help distinguish it.
fix: handle undefined agent.current() in opentui
test: add tests for TUI local context null safety
jwcrystal commentedon Mar 24, 2026
PR opened with a more complete fix: #18868
Difference from #17015: this also fixes the state-management side in
packages/opencode/src/cli/cmd/tui/context/local.tsxby handling empty initialization, staleagentStore.current, and empty-list navigation, instead of only removing the non-null assertion and adding call-site guards.github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.