opentui: crash #2287

Closed
opened 2026-02-16 17:34:59 -05:00 by yindo · 5 comments
Owner

Originally created by @rekram1-node on GitHub (Oct 26, 2025).

Originally assigned to: @thdxr on GitHub.

Description

On startup I got:

=== FATAL ERROR OCCURRED ===
Console cache:
2025-10-26T19:53:17.012Z ERROR TypeError: undefined is not an object (evaluating 'x3.data.providers')
Error details:
undefined is not an object (evaluating 'x3.data.providers')
TypeError: undefined is not an object (evaluating 'x3.data.providers')
at (src/cli/cmd/tui/context/sync.tsx:134:11)
at processTicksAndRejections (native:7:39)

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Originally created by @rekram1-node on GitHub (Oct 26, 2025). Originally assigned to: @thdxr on GitHub. ### Description On startup I got: === FATAL ERROR OCCURRED === Console cache: 2025-10-26T19:53:17.012Z ERROR TypeError: undefined is not an object (evaluating 'x3.data.providers') Error details: undefined is not an object (evaluating 'x3.data.providers') TypeError: undefined is not an object (evaluating 'x3.data.providers') at <anonymous> (src/cli/cmd/tui/context/sync.tsx:134:11) at processTicksAndRejections (native:7:39) ### OpenCode version _No response_ ### Steps to reproduce _No response_ ### Screenshot and/or share link _No response_ ### Operating System _No response_ ### Terminal _No response_
yindo added the opentuibug labels 2026-02-16 17:34:59 -05:00
yindo closed this issue 2026-02-16 17:34:59 -05:00
Author
Owner

@rekram1-node commented on GitHub (Oct 26, 2025):

This happened because of an invalid agent definition, if I run old opencode it will give a better error:

bun x opencode-ai@latest
Error: Config file at /Users/aidencline/development/opencode2/.opencode/agent/docs.md is invalid
@rekram1-node commented on GitHub (Oct 26, 2025): This happened because of an invalid agent definition, if I run old opencode it will give a better error: ``` bun x opencode-ai@latest Error: Config file at /Users/aidencline/development/opencode2/.opencode/agent/docs.md is invalid ```
Author
Owner

@github-actions[bot] commented on GitHub (Oct 26, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3232: Similar FATAL ERROR with TypeError evaluating undefined objects in opentui - shows "undefined is not an object (evaluating 'store.prompt.input')" which is very similar to your "undefined is not an object (evaluating 'x3.data.providers')" error
  • #3414: Another opentui crash on startup issue when pressing arrow keys on fresh installation

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 26, 2025): This issue might be a duplicate of existing issues. Please check: - #3232: Similar FATAL ERROR with TypeError evaluating undefined objects in opentui - shows "undefined is not an object (evaluating 'store.prompt.input')" which is very similar to your "undefined is not an object (evaluating 'x3.data.providers')" error - #3414: Another opentui crash on startup issue when pressing arrow keys on fresh installation Feel free to ignore if none of these address your specific case.
Author
Owner

@veracioux commented on GitHub (Oct 26, 2025):

I think to fully address this issue, we need to do a thorough implementation of proper error handling in sync.tsx. For one, https://github.com/sst/opencode/pull/3447 fixes this for invalid model in an agent *.md file (e.g. if you specify model: 1)

If you want you can offload this task to me - I can tackle it tomorrow.

@veracioux commented on GitHub (Oct 26, 2025): I think to fully address this issue, we need to do a thorough implementation of proper error handling in `sync.tsx`. For one, https://github.com/sst/opencode/pull/3447 fixes this for invalid model in an agent `*.md` file (e.g. if you specify `model: 1`) If you want you can offload this task to me - I can tackle it tomorrow.
Author
Owner

@rekram1-node commented on GitHub (Oct 26, 2025):

@veracioux should it be handled in sync.tsx? I would think that a validation error for invalid config should stop before it even spawns the tui

@rekram1-node commented on GitHub (Oct 26, 2025): @veracioux should it be handled in sync.tsx? I would think that a validation error for invalid config should stop before it even spawns the tui
Author
Owner

@veracioux commented on GitHub (Oct 27, 2025):

@rekram1-node That's a good point for this case, but I was talking more generally. For example, I see a lot of ! assertions in sync.tsx that seem fragile to me. That's why I suggest a proactive approach instead of a diagnostic approach.
But yes, I agree, this proactive approach should not be confined to just sync.tsx.

@veracioux commented on GitHub (Oct 27, 2025): @rekram1-node That's a good point for this case, but I was talking more generally. For example, I see a lot of `!` assertions in `sync.tsx` that seem fragile to me. That's why I suggest a proactive approach instead of a diagnostic approach. But yes, I agree, this proactive approach should not be confined to just `sync.tsx`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2287