Skip to content

The agent that grows with you

refactor(hermes_cli): oneshot — hoist stdlib json import

Teknium1235b36d229b
diff --git a/hermes_cli/oneshot.py b/hermes_cli/oneshot.py
index 72659011298..91a1b75a7c4 100644
--- a/hermes_cli/oneshot.py
+++ b/hermes_cli/oneshot.py
@@ -8,6 +8,7 @@ the provider; only --provider → error (ambiguous).
from __future__ import annotations
+import json
import logging
import os
import sys
@@ -147,8 +148,6 @@ def _write_usage_file(path: Optional[str], result: dict, failure: Optional[str]
if not path:
return
try:
- import json
-
report = {key: result.get(key) for key in _USAGE_KEYS}
report["failed"] = bool(result.get("failed")) or failure is not None
report["service_tier"] = result.get("service_tier")