TypeError: undefined is not an object (evaluating 'toSummarize.at(-1).info') #1778

Closed
opened 2026-02-16 17:32:35 -05:00 by yindo · 4 comments
Owner

Originally created by @hazyhaar on GitHub (Sep 20, 2025).

Originally assigned to: @thdxr on GitHub.

problem in the compiled binary at line 408387.

The toSummarize.at(-1) call is causing a crash when the array is empty. This is a runtime error in the opencode tool itself.

check if toSummarize is empty before accessing toSummarize.at(-1).

id: Identifier.create("message", false, toSummarize.length > 0 ? toSummarize.at(-1).info.time.created + 1 : 0),

This would prevent the crash by providing a fallback value when the array is empty.

Originally created by @hazyhaar on GitHub (Sep 20, 2025). Originally assigned to: @thdxr on GitHub. problem in the compiled binary at line 408387. The toSummarize.at(-1) call is causing a crash when the array is empty. This is a runtime error in the opencode tool itself. check if toSummarize is empty before accessing toSummarize.at(-1). id: Identifier.create("message", false, toSummarize.length > 0 ? toSummarize.at(-1).info.time.created + 1 : 0), This would prevent the crash by providing a fallback value when the array is empty.
yindo closed this issue 2026-02-16 17:32:35 -05:00
Author
Owner

@rekram1-node commented on GitHub (Sep 20, 2025):

what version are you on

@rekram1-node commented on GitHub (Sep 20, 2025): what version are you on
Author
Owner

@hazyhaar commented on GitHub (Sep 20, 2025):

0.7.2.

@hazyhaar commented on GitHub (Sep 20, 2025): 0.7.2.
Author
Owner

@rekram1-node commented on GitHub (Sep 20, 2025):

@hazyhaar this was fixed a while ago if you upgrade to latest it is resolved.

@rekram1-node commented on GitHub (Sep 20, 2025): @hazyhaar this was fixed a while ago if you upgrade to latest it is resolved.
Author
Owner

@hazyhaar commented on GitHub (Sep 20, 2025):

ty.

@hazyhaar commented on GitHub (Sep 20, 2025): ty.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1778