The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs(gateway): hygiene platform-stamp comments describe the retain flag, not a stale rebuild
teknium1627344842b39
diff --git a/gateway/run_turn.py b/gateway/run_turn.pyindex 95aa81223f7..80b01432b78 100644--- a/gateway/run_turn.py+++ b/gateway/run_turn.py@@ -1280,7 +1280,9 @@ class GatewayTurnMixin:session_id=session_entry.session_id, session_db=_hyg_session_db,)_seed_hygiene_system_prompt(_hyg_agent, _hyg_session_row)- # A rebuilt (not retained) prompt is deliberately stale for every real gateway surface.+ # The stamp only marks this agent as no real surface. Since #104414 Platform is not a+ # restore-identity field, so it no longer forces the next live turn to rebuild; the seed's+ # retain flag is what keeps the reduced-toolset build out of the session row (#122822)._hyg_agent.platform = _GATEWAY_HYGIENE_PLATFORMreturn _hyg_agent, _hyg_session_dbdiff --git a/gateway/slash_commands_session.py b/gateway/slash_commands_session.pyindex c6f26bef602..23c856091fd 100644--- a/gateway/slash_commands_session.py+++ b/gateway/slash_commands_session.py@@ -604,8 +604,10 @@ class GatewaySessionCommandsMixin:session_id=session_id,session_db=getattr(self._session_db, "_db", self._session_db))_seed_hygiene_system_prompt(tmp_agent, session_row)- # Real platform during construction (context engines bind correctly); afterwards a prompt- # rebuilt by compression is stamped as the provider-less fallback, stale for the next turn.+ # Real platform during construction (context engines bind correctly); the stamp afterwards+ # only marks this agent as no real surface. Since #104414 Platform is not a restore-identity+ # field, so it no longer forces the next live turn to rebuild; the seed's retain flag is what+ # keeps the reduced-toolset build out of the session row (#122822).tmp_agent.platform = _GATEWAY_HYGIENE_PLATFORMtmp_agent._print_fn = lambda *a, **kw: None# close() must not end the rotated session the gateway entry now points at.