The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(compression): debug-log checkpoint capability probe failures
KoNit-K8e7120e2fd07
diff --git a/agent/conversation_compression.py b/agent/conversation_compression.pyindex e2470581854..614ab7c1b05 100644--- a/agent/conversation_compression.py+++ b/agent/conversation_compression.py@@ -1292,6 +1292,8 @@ def _warn_checkpoint_required_without_capable_provider(agent: Any) -> None:Capability-probe exceptions are suppressed so a broken provider cannot crashagent construction — same fail-open style as the micro-compact warning.+ Probe failures log at DEBUG so a flaky probe can be diagnosed without+ refusing init or emitting the incapable-provider WARNING."""if getattr(agent, "compression_checkpoint_required", False) is not True:return@@ -1302,7 +1304,12 @@ def _warn_checkpoint_required_without_capable_provider(agent: Any) -> None:try:if bool(supports_checkpoint(PRE_COMPRESS_CHECKPOINT_API_VERSION)):return- except Exception:+ except Exception as exc:+ logger.debug(+ "checkpoint-required capability probe failed; init continues: %s",+ exc,+ exc_info=True,+ )returnlogger.warning("compression.checkpoint_required is enabled but the active memory "diff --git a/tests/agent/test_pre_compress_checkpoint_contract.py b/tests/agent/test_pre_compress_checkpoint_contract.pyindex 70252a94522..d47ad68cef9 100644--- a/tests/agent/test_pre_compress_checkpoint_contract.py+++ b/tests/agent/test_pre_compress_checkpoint_contract.py@@ -696,7 +696,15 @@ def test_startup_probe_exception_fails_open_without_crash_or_warning(caplog):_memory_manager=_ExplodingManager(),)- with caplog.at_level(logging.WARNING, logger="agent.conversation_compression"):+ with caplog.at_level(logging.DEBUG, logger="agent.conversation_compression"):_warn_checkpoint_required_without_capable_provider(agent)- assert "compression.checkpoint_required" not in _warn_text(caplog)+ warnings = "\n".join(+ r.getMessage() for r in caplog.records if r.levelno >= logging.WARNING+ )+ debugs = "\n".join(+ r.getMessage() for r in caplog.records if r.levelno == logging.DEBUG+ )+ assert "compression.checkpoint_required" not in warnings+ assert "probe exploded" in debugs+ assert "capability probe failed" in debugs