The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(agent/codex_runtime): keep separate anchor-reset statements (source-inspection tests pin them)
Tekniumbecdbd3f42f1
diff --git a/agent/codex_runtime.py b/agent/codex_runtime.pyindex 91a12afda19..fb136e7c682 100644--- a/agent/codex_runtime.py+++ b/agent/codex_runtime.py@@ -150,7 +150,8 @@ def _record_codex_app_server_compaction(agent, turn, *, approx_tokens: int | Noncompressor.last_prompt_tokens, compressor.last_completion_tokens = -1, 0compressor.awaiting_real_usage_after_compression = True# Provider-side context was rewritten; the usage anchor's transcript snapshot no longer matches.- agent._usage_anchor = agent._turn_base_usage_anchor = None+ agent._usage_anchor = None+ agent._turn_base_usage_anchor = Noneagent._last_compaction_in_place = False_call_guarded(getattr(agent, "event_callback", None) or None, "event_callback error on codex session:compress",args=("session:compress", {