fix(cli): sync session id after quiet -Q follow-up turns

_follow_up now calls _sync_cli_session_id_from_agent like the main turn,
so a mid-run compression rotation during a follow-up turn cannot leave a
stale session id on the stderr exit line (read by automation wrappers)
or on the notify-drain ownership key.
This commit is contained in:
kshitijk4poor
2026-09-14 20:29:40 +05:30
committed by kshitij
parent 30b02bba12
commit 1f3407aa00
+3
View File
@@ -4113,6 +4113,9 @@ def _run_quiet_single_query(cli, effective_query):
)
if isinstance(follow, dict) and follow.get("messages"):
history = follow["messages"]
# Same sync contract as the main turn: a compression rotation during a
# follow-up must not leave a stale id on the exit line / drain key.
_sync_cli_session_id_from_agent(cli)
return follow
# One shared linger budget for the whole run: the loop below and the later