Background
Follow-up from PR #92 (empty SIGNAL_REQUIRE_MENTION silently un-gating agents). An independent review of that diff surfaced a separate, pre-existing mismatch worth tracking.
The gap
HSM's settings GET/PUT (app/api/harnesses/[id]/settings/route.ts) reads and writes only the agent's .env for mention-gating. But the runtime (hermes-agent-mt gateway/platforms/signal.py:247-249) resolves require_mention from the gateway config extra (YAML) first, falling back to the SIGNAL_REQUIRE_MENTION env var only when the YAML value is None (gateway/config.py ~1127-1137).
Consequence: if an agent's YAML sets require_mention (or signal.require_mention), that outranks the .env value at runtime, and the HSM UI neither reads nor reflects it. The UI can therefore show a mention-gating state that doesn't match what the agent actually does.
Current impact
Latent. All current NimbleCoAI fleet agents are env-var/.env-driven (no YAML require_mention), so the UI is accurate today. This only bites if an agent is configured via gateway YAML.
Options
- Have the settings GET also read the agent's gateway YAML config and report the effective (YAML-or-env) value; PUT could warn or refuse when a YAML override is present.
- Document that
.env is HSM's source of truth and have agent import/normalize strip/avoid YAML require_mention.
- Accept as known-limitation and leave the code comment that's already in
route.ts.
References
Background
Follow-up from PR #92 (empty
SIGNAL_REQUIRE_MENTIONsilently un-gating agents). An independent review of that diff surfaced a separate, pre-existing mismatch worth tracking.The gap
HSM's settings GET/PUT (
app/api/harnesses/[id]/settings/route.ts) reads and writes only the agent's.envfor mention-gating. But the runtime (hermes-agent-mtgateway/platforms/signal.py:247-249) resolvesrequire_mentionfrom the gateway configextra(YAML) first, falling back to theSIGNAL_REQUIRE_MENTIONenv var only when the YAML value isNone(gateway/config.py~1127-1137).Consequence: if an agent's YAML sets
require_mention(orsignal.require_mention), that outranks the.envvalue at runtime, and the HSM UI neither reads nor reflects it. The UI can therefore show a mention-gating state that doesn't match what the agent actually does.Current impact
Latent. All current NimbleCoAI fleet agents are env-var/
.env-driven (no YAMLrequire_mention), so the UI is accurate today. This only bites if an agent is configured via gateway YAML.Options
.envis HSM's source of truth and have agent import/normalize strip/avoid YAMLrequire_mention.route.ts.References
route.tsmention-gating read (has an inline caveat comment)hermes-agent-mtgateway/platforms/signal.py,gateway/config.py