Bug Description
Configuration values for platforms.api_server (such as port, host, key, cors_origins) are silently ignored by the gateway when written at the top level of the api_server config block. The gateway silently falls back to defaults without any warning or error.
Root Cause
PlatformConfig.from_dict() in gateway/config.py (line 293-305) only reads from the extra dict:
return cls(
enabled=_coerce_bool(data.get("enabled"), False),
token=data.get("token"),
api_key=data.get("api_key"),
home_channel=home_channel,
reply_to_mode=data.get("reply_to_mode", "first"),
extra=data.get("extra", {}), # <-- ONLY reads 'extra'
)
Meanwhile, hermes config set platforms.api_server.port 8643 writes the value at platforms.api_server.port directly, which is the natural and expected YAML structure. These top-level fields are never consumed.
Reproduction
- Run
hermes config set platforms.api_server.port 8643
- Verify config.yaml now has:
platforms:
api_server:
enabled: true
port: 8643
- Start gateway:
hermes gateway start
- Check
lsof -i :8643 — nothing is listening
- Check
lsof -i :8642 — gateway is on 8642 (the default), with no warning
Expected Behavior
hermes config set should either write values under extra automatically, OR
PlatformConfig.from_dict() should also read top-level keys like port, host, key, cors_origins and merge them into extra
- At minimum, the gateway should log a warning when config values exist that it does not consume
Environment
- Hermes Agent version: latest main (as of May 2026)
- macOS, Python 3.12
Impact
This affects anyone running multiple Hermes profiles who needs to assign different ports. The bug is silent — no error, no warning — making it extremely difficult to debug. Users will think their config is not being picked up at all.
Bug Description
Configuration values for
platforms.api_server(such asport,host,key,cors_origins) are silently ignored by the gateway when written at the top level of theapi_serverconfig block. The gateway silently falls back to defaults without any warning or error.Root Cause
PlatformConfig.from_dict()ingateway/config.py(line 293-305) only reads from theextradict:Meanwhile,
hermes config set platforms.api_server.port 8643writes the value atplatforms.api_server.portdirectly, which is the natural and expected YAML structure. These top-level fields are never consumed.Reproduction
hermes config set platforms.api_server.port 8643hermes gateway startlsof -i :8643— nothing is listeninglsof -i :8642— gateway is on 8642 (the default), with no warningExpected Behavior
hermes config setshould either write values underextraautomatically, ORPlatformConfig.from_dict()should also read top-level keys likeport,host,key,cors_originsand merge them intoextraEnvironment
Impact
This affects anyone running multiple Hermes profiles who needs to assign different ports. The bug is silent — no error, no warning — making it extremely difficult to debug. Users will think their config is not being picked up at all.