Summary
PR #190 (open since 2026-03-26) fixes a critical bug where session file rotation (after /reset or natural rotation) causes LCM bootstrap() to enter a dead loop:
- New session file path ≠ old path → skips fast paths ✅
reconcileSessionTail() finds no overlap → hasOverlap: false ✅
bootstrapState never updated (only updates on hasOverlap: true) ❌
- Next call: same stale path, same dead loop → compaction never triggers
Production Impact
compaction_events: 0 rows (never compacted)
- Session tracked wrong
.jsonl file (815KB, stale)
- Two agents hit context overflow with
compactionAttempts: 0/1
Proposed Fix
Add rotation detection before the fast-path guard in bootstrap() — when path changes, purge stale conversation data and re-bootstrap fresh. Full diff in PR #190.
Workaround
We have applied the patch locally and it resolves the issue. Would love to see this merged upstream.
cc @jalehman
Summary
PR #190 (open since 2026-03-26) fixes a critical bug where session file rotation (after
/resetor natural rotation) causes LCMbootstrap()to enter a dead loop:reconcileSessionTail()finds no overlap →hasOverlap: false✅bootstrapStatenever updated (only updates onhasOverlap: true) ❌Production Impact
compaction_events: 0 rows (never compacted).jsonlfile (815KB, stale)compactionAttempts: 0/1Proposed Fix
Add rotation detection before the fast-path guard in
bootstrap()— when path changes, purge stale conversation data and re-bootstrap fresh. Full diff in PR #190.Workaround
We have applied the patch locally and it resolves the issue. Would love to see this merged upstream.
cc @jalehman