Follow-up from PR #20 review (CodeRabbit comment on tail extraction): #20 (comment)
Current behavior in lib/compaction/codex-compaction.ts::extractTailAfterSummary returns a cloned slice starting at the last role:"user" message. That matches the existing compaction flow, but if we ever keep summaries as user messages in the client-side transcript, they could be mistaken for the tail start.
This issue tracks:
- Adding an explicit way to mark summary items (e.g., metadata flag or dedicated field) so they are not treated as the conversation tail.
- Updating extractTailAfterSummary (and any related helpers) to skip summary-marked items when finding the tail start.
- Adjusting tests in test/codex-compaction.test.ts to clearly cover the summary-aware behavior.
We intentionally deferred this refinement from PR #20 to keep the change set focused.
Follow-up from PR #20 review (CodeRabbit comment on tail extraction): #20 (comment)
Current behavior in lib/compaction/codex-compaction.ts::extractTailAfterSummary returns a cloned slice starting at the last role:"user" message. That matches the existing compaction flow, but if we ever keep summaries as user messages in the client-side transcript, they could be mistaken for the tail start.
This issue tracks:
We intentionally deferred this refinement from PR #20 to keep the change set focused.