TypeError: undefined is not an object (evaluating k().length) when continuing session #9249

Closed
opened 2026-02-16 18:12:00 -05:00 by yindo · 3 comments
Owner

Originally created by @irfndi on GitHub (Feb 13, 2026).

Originally assigned to: @rekram1-node on GitHub.

Bug Description

Getting a TypeError when using the Tauri desktop application. The error occurs when attempting to continue a session - the application crashes with:

TypeError: undefined is not an object (evaluating k().length)

Stack Trace

@tauri://localhost/assets/session-CfjEucFw.js:11:15649
et@tauri://localhost/assets/bindings-efv5m1oc.js:1:6737
te@tauri://localhost/assets/bindings-efv5m1oc.js:1:6485
ye@tauri://localhost/assets/bindings-efv5m1oc.js:1:7919
Vt@tauri://localhost/assets/bindings-efv5m1oc.js:1:8820
cn@tauri://localhost/assets/bindings-efv5m1oc.js:1:8193
_@tauri://localhost/assets/bindings-efv5m1oc.js:1:8110
@tauri://localhost/assets/index-DuTmLSUP.js:2014:46460 continue

The error is triggered from the continue action in the session UI.

Environment

  • Application: OpenCode Tauri desktop app
  • Affected files: session-CfjEucFw.js, bindings-efv5m1oc.js, index-DuTmLSUP.js
  • Platform: macOS (Tauri)

Steps to Reproduce

  1. Open the OpenCode desktop application
  2. Attempt to continue an existing session (via UI or CLI with --continue flag)
  3. Error occurs when the continue action is triggered

Expected Behavior

Application should continue the session without throwing a TypeError

Additional Notes

The error suggests that somewhere in the continue flow, a function returns undefined instead of an array, and .length is accessed on it. This could happen when:

  • Continuing a session that has no messages/todos
  • Session state is corrupted or missing
  • The session data structure does not have the expected array property
Originally created by @irfndi on GitHub (Feb 13, 2026). Originally assigned to: @rekram1-node on GitHub. ## Bug Description Getting a TypeError when using the Tauri desktop application. The error occurs when attempting to continue a session - the application crashes with: TypeError: undefined is not an object (evaluating k().length) ## Stack Trace @tauri://localhost/assets/session-CfjEucFw.js:11:15649 et@tauri://localhost/assets/bindings-efv5m1oc.js:1:6737 te@tauri://localhost/assets/bindings-efv5m1oc.js:1:6485 ye@tauri://localhost/assets/bindings-efv5m1oc.js:1:7919 Vt@tauri://localhost/assets/bindings-efv5m1oc.js:1:8820 cn@tauri://localhost/assets/bindings-efv5m1oc.js:1:8193 _@tauri://localhost/assets/bindings-efv5m1oc.js:1:8110 @tauri://localhost/assets/index-DuTmLSUP.js:2014:46460 continue The error is triggered from the continue action in the session UI. ## Environment - Application: OpenCode Tauri desktop app - Affected files: session-CfjEucFw.js, bindings-efv5m1oc.js, index-DuTmLSUP.js - Platform: macOS (Tauri) ## Steps to Reproduce 1. Open the OpenCode desktop application 2. Attempt to continue an existing session (via UI or CLI with --continue flag) 3. Error occurs when the continue action is triggered ## Expected Behavior Application should continue the session without throwing a TypeError ## Additional Notes The error suggests that somewhere in the continue flow, a function returns undefined instead of an array, and .length is accessed on it. This could happen when: - Continuing a session that has no messages/todos - Session state is corrupted or missing - The session data structure does not have the expected array property
yindo added the webneeds:compliance labels 2026-02-16 18:12:00 -05:00
yindo closed this issue 2026-02-16 18:12:00 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2026):

This issue doesn't fully meet our contributing guidelines.

What needs to be fixed:

  • Bug Description field is empty - please provide a detailed description of what you were doing when the error occurred
  • Stack Trace field is empty - please include the full error stack trace (it helps us identify the root cause)
  • Steps to Reproduce contains placeholder text "[Unknown - need more context]" - please provide clear steps showing how to trigger this error
  • Missing context - we need to understand your environment better. What were you trying to do? What actions led to this error?

A good bug report should include:

  • What you were doing when the error occurred
  • Expected vs actual behavior
  • Complete error message and stack trace
  • Steps to consistently reproduce the issue
  • System information (which you've partially provided)

Please edit this issue to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions[bot] commented on GitHub (Feb 13, 2026): <!-- issue-compliance --> This issue doesn't fully meet our [contributing guidelines](https://github.com/anomalyco/opencode/blob/dev/CONTRIBUTING.md). **What needs to be fixed:** - **Bug Description** field is empty - please provide a detailed description of what you were doing when the error occurred - **Stack Trace** field is empty - please include the full error stack trace (it helps us identify the root cause) - **Steps to Reproduce** contains placeholder text "[Unknown - need more context]" - please provide clear steps showing how to trigger this error - **Missing context** - we need to understand your environment better. What were you trying to do? What actions led to this error? A good bug report should include: - What you were doing when the error occurred - Expected vs actual behavior - Complete error message and stack trace - Steps to consistently reproduce the issue - System information (which you've partially provided) Please edit this issue to address the above within **2 hours**, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know.
Author
Owner

@irfndi commented on GitHub (Feb 13, 2026):

Additional Information

Based on the stack trace analysis:

Affected Component: The error occurs in the session-related code () when triggering a "continue" action. The stack trace shows:

Likely Cause: The error suggests that somewhere in the continue flow, a function is being called that returns instead of an array, and then is being accessed on the result.

This could happen when:

  1. Continuing a session that has no messages/todos
  2. Session state is corrupted or missing
  3. The session data structure doesn't have the expected array property

Possible Related Code:

    • CLI continue option
    • TUI session thread handling
    • Session UI page

Would help to know:

  1. What were you doing right before the error? (Starting a new session? Continuing an existing one?)
  2. Did you just install/update the app?
  3. Is this the first time you're seeing this error?
@irfndi commented on GitHub (Feb 13, 2026): ## Additional Information Based on the stack trace analysis: **Affected Component**: The error occurs in the session-related code () when triggering a "continue" action. The stack trace shows: **Likely Cause**: The error suggests that somewhere in the continue flow, a function is being called that returns instead of an array, and then is being accessed on the result. This could happen when: 1. Continuing a session that has no messages/todos 2. Session state is corrupted or missing 3. The session data structure doesn't have the expected array property **Possible Related Code**: - - CLI continue option - - TUI session thread handling - - Session UI page Would help to know: 1. What were you doing right before the error? (Starting a new session? Continuing an existing one?) 2. Did you just install/update the app? 3. Is this the first time you're seeing this error?
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2026):

This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new issue that follows our issue templates.

@github-actions[bot] commented on GitHub (Feb 13, 2026): This issue has been automatically closed because it was not updated to meet our [contributing guidelines](../blob/dev/CONTRIBUTING.md) within the 2-hour window. Feel free to open a new issue that follows our issue templates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9249