Skip to content

The agent that grows with you

fix(gateway): project the user's own display config to native clients

teknium115d17871e807
diff --git a/gateway/session_config.py b/gateway/session_config.py
index b4df84afb40..3471d546ce3 100644
--- a/gateway/session_config.py
+++ b/gateway/session_config.py
@@ -64,6 +64,7 @@ async def config_get(connection, ref, params):
def read():
from gateway.run import _profile_runtime_scope
from hermes_cli.config import load_config
+ from hermes_cli.config_effective import load_user_config_effective
from hermes_constants import DEFAULT_INDICATOR_STYLE
from tools.approval_context import _get_approval_mode
home = Path(connection.authority.profile_id)
@@ -71,7 +72,9 @@ async def config_get(connection, ref, params):
cfg = load_config()
display = cfg.get('display') or {}
getters = {
- 'full': lambda: {'config': _client_config(cfg)},
+ # The user's own settings, not DEFAULT_CONFIG: clients read an absent key as their
+ # own default (the TUI streams unless display.streaming is explicitly false).
+ 'full': lambda: {'config': _client_config(load_user_config_effective(home / 'config.yaml'))},
'mtime': lambda: {'mtime': (home / 'config.yaml').stat().st_mtime
if (home / 'config.yaml').exists() else 0,
# Frozen tool policy is not a live MCP reload request.
diff --git a/tests/gateway/test_session_config_projection.py b/tests/gateway/test_session_config_projection.py
index 72571d299c1..fbbeddd2259 100644
--- a/tests/gateway/test_session_config_projection.py
+++ b/tests/gateway/test_session_config_projection.py
@@ -28,6 +28,8 @@ def test_client_config_projection_keeps_session_policy_and_secrets_private(tmp_p
assert full.get('result', {}).get('config', {}).get('voice', {}).get('record_key') == 'ctrl+r', full
assert 'PRIVATE_VOICE' not in json.dumps(full)
assert full['result']['config']['display']['bell_on_complete'] is True
+ # The user's settings, not DEFAULT_CONFIG: an unset display.streaming stays unset.
+ assert 'streaming' not in full['result']['config']['display']
mtime = (await rpc(ws, 'config.get', key='mtime', session_id=sid))['result']
assert mtime['mtime'] > 0 and mtime['mcp_rev']
config['mcp_servers'] = {'later': {'command': 'not-started'}}