opentui: fatal: undefined is not an object (evaluating 'input.setText') #4715

Closed
opened 2026-02-16 17:45:09 -05:00 by yindo · 2 comments
Owner

Originally created by @gustavovalverde on GitHub (Jan 11, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

TypeError: undefined is not an object (evaluating 'input.setText')
    at set (src/cli/cmd/tui/component/prompt/index.tsx:412:7)
    at ref (src/cli/cmd/tui/routes/session/index.tsx:1055:21)
    at Prompt (src/cli/cmd/tui/component/prompt/index.tsx:398:9)
    at untrack (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:475:12)
    at runComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:724:3)
    at devComponent (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:593:3)
    at <anonymous> (src/cli/cmd/tui/routes/session/index.tsx:1046:29)
    at children (src/cli/cmd/tui/routes/session/index.tsx:1068:20)
    at <anonymous> (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:1531:21)
    at runComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:742:22)
    at updateComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:724:3)
    at runTop (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:833:7)
    at runQueue (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:904:42)
    at completeUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:860:84)
    at runUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:850:5)
    at setStore (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/store/dist/dev.js:221:5)
    at sync (src/cli/cmd/tui/context/sync.tsx:304:11)
    at processTicksAndRejections (native:7:39)...

Plugins

None

OpenCode version

1.1.12

Steps to reproduce

This happened while forking a session of a Plan. This was the first prompt, and the plan was running. I wanted to fork to another session, to make another model plan the same thing.

Screenshot and/or share link

No response

Operating System

macOS Tahoe

Terminal

Ghostty

Originally created by @gustavovalverde on GitHub (Jan 11, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description ``` TypeError: undefined is not an object (evaluating 'input.setText') at set (src/cli/cmd/tui/component/prompt/index.tsx:412:7) at ref (src/cli/cmd/tui/routes/session/index.tsx:1055:21) at Prompt (src/cli/cmd/tui/component/prompt/index.tsx:398:9) at untrack (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:475:12) at runComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:742:22) at updateComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:724:3) at devComponent (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:593:3) at <anonymous> (src/cli/cmd/tui/routes/session/index.tsx:1046:29) at children (src/cli/cmd/tui/routes/session/index.tsx:1068:20) at <anonymous> (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:1531:21) at runComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:742:22) at updateComputation (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:724:3) at runTop (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:833:7) at runQueue (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:904:42) at completeUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:860:84) at runUpdates (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/dev.js:850:5) at setStore (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/store/dist/dev.js:221:5) at sync (src/cli/cmd/tui/context/sync.tsx:304:11) at processTicksAndRejections (native:7:39)... ``` ### Plugins None ### OpenCode version 1.1.12 ### Steps to reproduce This happened while forking a session of a Plan. This was the first prompt, and the plan was running. I wanted to fork to another session, to make another model plan the same thing. ### Screenshot and/or share link _No response_ ### Operating System macOS Tahoe ### Terminal Ghostty
yindo added the opentuibug labels 2026-02-16 17:45:09 -05:00
yindo closed this issue 2026-02-16 17:45:09 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 11, 2026):

This issue might be a duplicate of existing issues related to the prompt component and TUI crashes. Please check:

  • #7727: opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name')
  • #7550: opentui: TUI crashes after successful native OpenAI account connection (TypeError: local.agent.current() is undefined)
  • #7630: opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name')
  • #7628: opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name') - When login copilot

These all show similar "undefined is not an object" errors in the prompt component (src/cli/cmd/tui/component/prompt/index.tsx), though with different expressions being evaluated. The pattern suggests a common underlying issue with component state or ref initialization in the prompt component.

Feel free to ignore if your specific case (forking a session during plan execution) has a unique cause, but these issues may share the same root cause.

@github-actions[bot] commented on GitHub (Jan 11, 2026): This issue might be a duplicate of existing issues related to the prompt component and TUI crashes. Please check: - #7727: opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name') - #7550: opentui: TUI crashes after successful native OpenAI account connection (TypeError: local.agent.current() is undefined) - #7630: opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name') - #7628: opentui: fatal: undefined is not an object (evaluating 'local.agent.current().name') - When login copilot These all show similar "undefined is not an object" errors in the prompt component (src/cli/cmd/tui/component/prompt/index.tsx), though with different expressions being evaluated. The pattern suggests a common underlying issue with component state or ref initialization in the prompt component. Feel free to ignore if your specific case (forking a session during plan execution) has a unique cause, but these issues may share the same root cause.
Author
Owner

@rekram1-node commented on GitHub (Jan 12, 2026):

Release going out now

@rekram1-node commented on GitHub (Jan 12, 2026): Release going out now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4715