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
bug(context-pivot): reset pending pivots when sessions change #746
context-pivot clears pending and compacting on session_shutdown, but Pi can start a replacement session through session_start before an old compaction callback settles. The old in-memory compacting flag then makes the new Session's first context_pivot fail with "A context pivot is already in progress."
Minimal reproduction
Start context_pivot in a session above the threshold, so the extension records a pending pivot and sets compacting.
Start a replacement Pi session before the original compaction calls back.
Call context_pivot in the new long-context session.
The new Session is rejected by stale runtime state.
Expected behavior
Pending compaction state is session-local. A fresh session_start invalidates old pending state and allows a new eligible Session to pivot.
Proposed scope
Reset the existing generation/pending/compacting state at session start and add a lifecycle regression ensuring a second session can begin its own pivot.
I am claiming this focused lifecycle defect. I will add a second-session regression that starts a pending pivot, changes sessions, and verifies the new eligible session can start its own pivot.
Activity
outlier27-cell commentedon Oct 11, 2026
I am claiming this focused lifecycle defect. I will add a second-session regression that starts a pending pivot, changes sessions, and verifies the new eligible session can start its own pivot.