Skip to content

The agent that grows with you

fix(config): drop the "Hermes does not read this" note on config set

teknium108f36192b5b1
diff --git a/hermes_cli/config.py b/hermes_cli/config.py
index 927c0f4e2fb..ef2e8406e58 100644
--- a/hermes_cli/config.py
+++ b/hermes_cli/config.py
@@ -3544,7 +3544,7 @@ def set_config_value(key: str, value: str, force: bool = False):
save_provider_env_credential(key.upper(), value)
print(f"✓ Set {key} in {get_env_path()}")
return
- from hermes_cli.config_env_routing import is_env_setting_key, save_env_setting, unknown_env_name_note
+ from hermes_cli.config_env_routing import is_env_setting_key, save_env_setting
if is_env_setting_key(key):
# Every UPPER_SNAKE name is an environment setting: same file the platform setup flows and
@@ -3556,9 +3556,6 @@ def set_config_value(key: str, value: str, force: bool = False):
except ValueError as exc:
_exit_invalid(f"✗ {exc}")
print(f"✓ Set {key.upper()} in {get_env_path()}")
- note = unknown_env_name_note(key)
- if note:
- print(note)
return
# Canonicalize per-platform display keys BEFORE validation/coercion so both see the path the
diff --git a/hermes_cli/config_env_routing.py b/hermes_cli/config_env_routing.py
index 826a7f32514..9b4759571ec 100644
--- a/hermes_cli/config_env_routing.py
+++ b/hermes_cli/config_env_routing.py
@@ -41,16 +41,6 @@ def is_env_setting_key(key: str) -> bool:
return bool(_ENV_SHAPE_RE.match(key)) or is_registered_env_name(key.upper())
-def unknown_env_name_note(key: str) -> Optional[str]:
- """One-line heads-up when Hermes itself does not enumerate ``key``. The value is
- still exported to the process environment from ``.env``, so a plugin or skill may read it."""
- name = key.upper()
- if is_registered_env_name(name):
- return None
- return (f" (note: Hermes does not read {name} itself; it is exported to the process environment "
- "from .env for plugins, skills and external tools)")
-
-
def _drop_config_yaml_copies(key: str) -> bool:
"""Remove same-named top-level ``config.yaml`` copies (as typed and upper-cased) so the ``.env``
value is the only one the gateway bridge and CLI readers can disagree about."""
diff --git a/tests/hermes_cli/test_config_platform_env_routing.py b/tests/hermes_cli/test_config_platform_env_routing.py
index a4dec3a6009..59705e7bdd4 100644
--- a/tests/hermes_cli/test_config_platform_env_routing.py
+++ b/tests/hermes_cli/test_config_platform_env_routing.py
@@ -77,7 +77,6 @@ def test_unregistered_upper_snake_name_routes_to_env_by_shape(tmp_path, monkeypa
cfg.set_config_value("HERMES_TIMEZONE", "Europe/Berlin")
cfg.set_config_value("my_custom_flag", "hello")
out = capsys.readouterr().out
- assert "does not read" not in out # both names are documented: no unknown-variable note
env_text = (tmp_path / ".env").read_text(encoding="utf-8")
assert "TELEGRAM_GROUP_ALLOWED_USERS=222,333" in env_text and "HERMES_TIMEZONE=Europe/Berlin" in env_text
@@ -108,6 +107,6 @@ def test_env_writer_denylist_guards_upper_snake_names_and_unknown_names_get_a_no
cfg.set_config_value("SOME_PLUGIN_ONLY_KNOB", "xyz")
out = capsys.readouterr().out
- assert "✓ Set SOME_PLUGIN_ONLY_KNOB in" in out and "does not read SOME_PLUGIN_ONLY_KNOB" in out
+ assert "✓ Set SOME_PLUGIN_ONLY_KNOB in" in out
assert "SOME_PLUGIN_ONLY_KNOB=xyz" in (tmp_path / ".env").read_text(encoding="utf-8")
assert yaml.safe_load(config_path.read_text(encoding="utf-8")) == {"model": {"default": "test/model"}}
diff --git a/website/docs/reference/cli-commands.md b/website/docs/reference/cli-commands.md
index 4c6dfcb9a96..337d7fb8832 100644
--- a/website/docs/reference/cli-commands.md
+++ b/website/docs/reference/cli-commands.md
@@ -1241,7 +1241,7 @@ Subcommands:
| `show` | Show current config values. |
| `edit` | Open `config.yaml` in your editor. |
| `get <key> [--json] [--raw]` | Print a single config value by dotted key (e.g. `hermes config get model.default`). `--json` emits machine-readable output. Credential-shaped values (`api_key`, `*_TOKEN`, `*_SECRET`, `password`, …) are masked (`sk-o...7890`) because the agent runs this from sessions whose transcripts persist; `--raw` prints the real value (or set `security.redact_secrets: false`). |
-| `set <key> <value> [--force]` | Set a config value. Dotted paths go to `config.yaml`; every `UPPER_SNAKE` name (`OPENROUTER_API_KEY`, `DISCORD_HOME_CHANNEL`, `TELEGRAM_GROUP_ALLOWED_USERS`, `HERMES_TIMEZONE`, …) is an environment variable and goes to `.env` — the same file the platform setup flows and `/sethome` write, and the one every runtime reader resolves against. `config set` never writes an `UPPER_SNAKE` key into `config.yaml`, `--force` included; names on the env writer's denylist (`HERMES_YOLO_MODE`, `PATH`, …) are refused outright, and a name Hermes neither reads nor documents is still saved with a one-line note. An unknown path under a known section (`gateway.discord.foo`) is refused with a did-you-mean and nothing is written; an unknown lowercase *top-level* key is written with a notice (top-level scalars are bridged into the environment for skills). `--force` writes either of those. |
+| `set <key> <value> [--force]` | Set a config value. Dotted paths go to `config.yaml`; every `UPPER_SNAKE` name (`OPENROUTER_API_KEY`, `DISCORD_HOME_CHANNEL`, `TELEGRAM_GROUP_ALLOWED_USERS`, `HERMES_TIMEZONE`, …) is an environment variable and goes to `.env` — the same file the platform setup flows and `/sethome` write, and the one every runtime reader resolves against. `config set` never writes an `UPPER_SNAKE` key into `config.yaml`, `--force` included; names on the env writer's denylist (`HERMES_YOLO_MODE`, `PATH`, …) are refused outright; any other `UPPER_SNAKE` name is saved to `.env` as-is (plugins, skills and external tools read it from the process environment). An unknown path under a known section (`gateway.discord.foo`) is refused with a did-you-mean and nothing is written; an unknown lowercase *top-level* key is written with a notice (top-level scalars are bridged into the environment for skills). `--force` writes either of those. |
| `unset <key>` | Remove a config key, reverting it to the built-in default. For `UPPER_SNAKE` names this removes the `.env` entry and also drops a stale top-level `config.yaml` copy left by older `config set` runs (`get` reports such a copy as stale). |
| `path` | Print the config file path. |
| `env-path` | Print the `.env` file path. |