fix(compression): re-arm the drifted-prompt INFO on session reset so it is once per session

The INFO-once flag `_compaction_prompt_drift_logged` lived on the AIAgent and
was never cleared, so on a CLI agent that /new, /resume or /branch-rebinds
sessions the line was INFO once per agent lifetime, not once per session as
the commit and PR text claim. reset_session_state is the per-session reset
point for agent-held counters (`_user_turn_count` lives there); clear the
flag alongside it.
This commit is contained in:
teknium1
2026-09-16 12:29:38 -07:00
committed by Teknium
parent 8188373b72
commit 0023b904e4

View File

@@ -404,6 +404,8 @@ class AIAgent(
# Turn counter (added after reset_session_state was first written — #2635)
self._user_turn_count = 0
# The drifted-prompt compaction INFO is once per session, so a /new or /resume re-arms it.
self._compaction_prompt_drift_logged = False
# Who wrote the current turn. build_turn_context() sets it at the start of every turn.
self._turn_author = None
# Copilot x-initiator: True for the first API call of a user turn, False for tool-loop follow-ups.