Skip to content

fix(contexto): Parse msgId in context window#130

Merged
sm86 merged 1 commit into
mainfrom
fix-msg-id
Apr 24, 2026
Merged

fix(contexto): Parse msgId in context window#130
sm86 merged 1 commit into
mainfrom
fix-msg-id

Conversation

@DaevMithran
Copy link
Copy Markdown
Collaborator

@DaevMithran DaevMithran commented Apr 24, 2026

Summary

SlidingWindowEngine.compact() was always returning firstKeptEntryId: undefined, so the runtime couldn't trim evicted entries from the transcript after engine-owned compaction.

Root cause

getFirstKeptEntryId() was looking for .id on the WebhookPayload wrapper, but the message id lives on the message objects inside data.messages[].

Fix

Read the id from the first message of the first kept episode payload:

@DaevMithran DaevMithran requested a review from sm86 April 24, 2026 09:00
@DaevMithran DaevMithran changed the title fix: Parse msgId in context window fix(contexto): Parse msgId in context window Apr 24, 2026
@sm86 sm86 merged commit 5d4de1f into main Apr 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants