Every session_compact replans pendingReinject in defer mode; skipped reinject clears the queue unless manual compaction is waiting for the next user prompt.
Co-authored-by: Cursor <cursoragent@cursor.com>
Stale pendingReinject from auto compaction is blocked until the next user prompt after manual /compact with default settings; a later auto compaction resets the clear flag.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire debug force re-inject through the existing immediate delivery path with registered skills from the session.
Co-authored-by: Cursor <cursoragent@cursor.com>
Persist autoCompactIntegration override in state and wire resolveDeliveryMode plus status delivery line.
Co-authored-by: Cursor <cursoragent@cursor.com>
Append skill-reinject:state before extension teardown so the latest tracked
skills and session override survive quit, reload, and session replacement.
Co-authored-by: Cursor <cursoragent@cursor.com>
Extract restoreSessionState for reload/resume/startup and reuse on session_tree
so /tree branch navigation reloads persisted state or rescans like session_start.
Co-authored-by: Cursor <cursoragent@cursor.com>
Walk user messages and read tool calls on session_start to rebuild tracked
skills from history when no skill-reinject:state entry exists on the branch.
Co-authored-by: Cursor <cursoragent@cursor.com>
Restore skill-reinject:state from branch on startup/resume, read merged settings,
and detect pi-auto-compact; reset to initial state when no entry exists.
Co-authored-by: Cursor <cursoragent@cursor.com>
Connect compaction source gate with plan/enqueue/send paths and consume deferred queue on before_agent_start for end-to-end auto compaction trigger.
Co-authored-by: Cursor <cursoragent@cursor.com>
Call saveState via appendEntry after slash, skill-block, and read-path tracking so session state survives resume.
Co-authored-by: Cursor <cursoragent@cursor.com>
Match read tool paths against registered skills when trackReadPaths is enabled and upsert with source read.
Co-authored-by: Cursor <cursoragent@cursor.com>
Scan finalized user message text for expanded skill XML blocks and upsert tracked skills using registered metadata when available.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire input handler to detect slash skills and upsert into session state using registered skill metadata from before_agent_start cache or loadSkills fallback.
Co-authored-by: Cursor <cursoragent@cursor.com>