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
TypeError: undefined is not an object (evaluating 'toSummarize.at(-1).info') #2559
A TypeError: undefined is not an object (evaluating 'toSummarize.at(-1).info') occurs during session summarization when attempting to create issue content.
Steps to Reproduce
Trigger session summarization in scenarios where there are 0 or 1 messages after the last summary message.
The error occurs at line 1826 in packages/opencode/src/session/index.ts when accessing toSummarize.at(-1).info.time.created.
Expected Behavior
Session summarization should handle cases with no messages to summarize gracefully without throwing an error.
Actual Behavior
The application throws a TypeError because toSummarize is an empty array, and at(-1) returns undefined.
Root Cause
The summarize function assumes toSummarize (a slice of messages) is non-empty, but it can be empty when msgs.length - start is 0 or 1, leading to an empty slice.
Environment
Platform: Linux
Opencode version: 0.7.3
Additional Context
This error prevents proper session compaction and interrupts user workflows
The error you're experiencing seems to be in the summarization logic during session compaction. While not exact duplicates, these issues all relate to problems with the compaction/summarization system.
Feel free to ignore if none of these address your specific case.
Activity
github-actions commentedon Sep 12, 2025
This issue might be a duplicate or related to existing issues. Please check:
/compactis not interruptable #606: Problems with compact command interruption (closed, but related to compaction functionality)The error you're experiencing seems to be in the summarization logic during session compaction. While not exact duplicates, these issues all relate to problems with the compaction/summarization system.
Feel free to ignore if none of these address your specific case.
vldF commentedon Sep 12, 2025
I have this too
thdxr commentedon Sep 12, 2025
should be fixed now