Skip to content

The agent that grows with you

fix(config): the custom-top-level footer prints only for top-level keys

kshitijk4poor2cf1351779fa
diff --git a/hermes_cli/config.py b/hermes_cli/config.py
index 2ca30e5ae5e..f68d8d64586 100644
--- a/hermes_cli/config.py
+++ b/hermes_cli/config.py
@@ -3514,10 +3514,15 @@ def _print_unknown_key_notice(key: str, suggestion: Optional[str]) -> None:
"but Hermes may not read it.", Colors.YELLOW))
if suggestion:
print(color(f" Did you mean: {suggestion}", Colors.YELLOW))
- print(color(
- " (Custom top-level keys are supported and bridged to the "
- "environment for skills/external tools. Use --force to skip "
- "this notice.)", Colors.DIM))
+ # The env bridge covers custom TOP-LEVEL keys only; an unseeded nested path (``stt.provider``)
+ # is written but not bridged, so the footer would be a false promise there.
+ if len(_split_key_path(key)) == 1:
+ print(color(
+ " (Custom top-level keys are supported and bridged to the "
+ "environment for skills/external tools. Use --force to skip "
+ "this notice.)", Colors.DIM))
+ else:
+ print(color(" (Use --force to skip this notice.)", Colors.DIM))
def _unknown_subkey_refusal(key: str, suggestion: Optional[str]) -> str:
diff --git a/tests/hermes_cli/test_set_config_value.py b/tests/hermes_cli/test_set_config_value.py
index 0252a59132a..88e9a32d30b 100644
--- a/tests/hermes_cli/test_set_config_value.py
+++ b/tests/hermes_cli/test_set_config_value.py
@@ -554,6 +554,9 @@ class TestSchemaValidation:
assert saved[section][name] == expected
out = capsys.readouterr().out
assert "not a recognized config key" in out
+ # Nested paths are written but never env-bridged: the top-level-only footer must not print.
+ assert "bridged to the environment" not in out
+ assert "Use --force" in out
if suggestion is None:
assert "Did you mean" not in out
else: