From 07349ce4df74a98678070255f46fcee0f1718ba0 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Wed, 13 May 2026 22:04:49 -0700 Subject: [PATCH] fix(memory): pin session_start + session_id on background review fork Belt-and-suspenders complement to the cached-system-prompt inheritance: pin session_start and session_id to the parent's so any code path that re-renders parts of the system prompt (compression, plugin hooks) still produces byte-identical output. The cached-prompt assignment already short-circuits the normal rebuild path, but these pins guarantee parity even if a future code path bypasses the cache. Idea from simpolism's reference PR #25427 for #25322. Co-Authored-By: simpolism <32201324+simpolism@users.noreply.github.com> --- run_agent.py | 9 +++++++++ scripts/release.py | 2 ++ 2 files changed, 11 insertions(+) diff --git a/run_agent.py b/run_agent.py index ecaceaa78d7..53177931b81 100644 --- a/run_agent.py +++ b/run_agent.py @@ -4316,6 +4316,15 @@ class AIAgent: # measured impact (~26% end-to-end cost reduction on # Sonnet 4.5). review_agent._cached_system_prompt = self._cached_system_prompt + # Defensive: pin session_start + session_id to the + # parent's so any code path that re-renders parts of + # the system prompt (compression, plugin hooks) still + # produces byte-identical output. The cached-prompt + # assignment above already short-circuits the normal + # rebuild path, but these pins guarantee parity even + # if a future code path bypasses the cache. + review_agent.session_start = self.session_start + review_agent.session_id = self.session_id from model_tools import get_tool_definitions from hermes_cli.plugins import ( diff --git a/scripts/release.py b/scripts/release.py index 471c6b0ae68..9932dfd55ee 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -43,6 +43,8 @@ AUTHOR_MAP = { "teknium1@gmail.com": "teknium1", "30366221+WorldWriter@users.noreply.github.com": "WorldWriter", "dafeng@DafengdeMacBook-Pro.local": "WorldWriter", + "32201324+simpolism@users.noreply.github.com": "simpolism", + "simpolism@gmail.com": "simpolism", "mgongzai@gmail.com": "vKongv", "0x.badfriend@gmail.com": "discodirector", "altriatree@gmail.com": "TruaShamu",