The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(telemetry): read marker and receipt JSON BOM-tolerant (Windows footgun gate)
teknium193341d68c034
diff --git a/hermes_cli/observability/shared_metrics_process.py b/hermes_cli/observability/shared_metrics_process.pyindex c0fcd27fc9c..c8cee799f71 100644--- a/hermes_cli/observability/shared_metrics_process.py+++ b/hermes_cli/observability/shared_metrics_process.py@@ -127,7 +127,7 @@ def _claim(path: Path) -> Path | None:else:record_path = Nonetry:- record = json.loads(path.read_text(encoding="utf-8"))+ record = json.loads(path.read_text(encoding="utf-8-sig"))except (OSError, ValueError):return Noneif record_path is None and record.get("state") == "running" and runtime_status_pid_is_live(record):@@ -169,7 +169,7 @@ def _report_dead_markers(home: Path, own: Path) -> None:if claimed is None:continuetry:- record = json.loads(claimed.read_text(encoding="utf-8"))+ record = json.loads(claimed.read_text(encoding="utf-8-sig"))except (OSError, ValueError):record = Noneif isinstance(record, dict):diff --git a/hermes_cli/observability/shared_metrics_update.py b/hermes_cli/observability/shared_metrics_update.pyindex 0185cc061c4..d29e9856b90 100644--- a/hermes_cli/observability/shared_metrics_update.py+++ b/hermes_cli/observability/shared_metrics_update.py@@ -173,7 +173,7 @@ def report_pending_updates() -> None:returnfor path in sorted(directory.glob("*.json")):try:- receipt = json.loads(path.read_text(encoding="utf-8"))+ receipt = json.loads(path.read_text(encoding="utf-8-sig"))path.unlink() # claim first: a concurrent start that loses the unlink records nothingexcept (OSError, ValueError):continue