Teknium
5e92a4ce5a
fix: auto-reload MCP tools when mcp_servers config changes without restart ( #1474 )
...
Fixes #1036
After adding an MCP server to config.yaml, users had to restart Hermes
before the new tools became visible — even though /reload-mcp existed.
Add _check_config_mcp_changes() called from process_loop every 5s:
- stat() config.yaml for mtime changes (fast path, no YAML parse)
- On mtime change, parse and compare mcp_servers section
- If mcp_servers changed, auto-trigger _reload_mcp() and notify user
- Skip check while agent is running to avoid interrupting tool calls
- Throttled to CONFIG_WATCH_INTERVAL=5s to avoid busy-polling
/reload-mcp still works for manual force-reload.
Tests: 6 new tests in TestMCPConfigWatch, all passed
Co-authored-by: teyrebaz33 <hakanerten02@hotmail.com >
2026-03-15 19:03:34 -07:00
..
2026-03-14 00:09:05 -07:00
2026-03-14 23:44:47 -07:00
2026-03-14 22:22:31 -07:00
2026-03-14 14:27:20 +03:00
2026-03-15 07:59:55 -07:00
2026-03-15 06:46:28 -07:00
2026-03-12 16:23:34 -04:00
2026-03-15 05:20:17 -07:00
2026-03-14 22:11:34 -07:00
2026-03-15 18:07:03 -07:00
2025-10-01 23:29:25 +00:00
2026-03-14 21:11:37 -07:00
2026-03-12 08:35:45 -07:00
2026-03-14 02:33:31 -07:00
2026-03-10 15:22:44 -07:00
2026-03-12 01:23:28 -07:00
2026-03-15 08:02:29 -07:00
2026-03-14 11:03:20 -07:00
2026-03-14 23:44:47 -07:00
2026-03-14 19:38:55 -07:00
2026-03-14 19:38:55 -07:00
2026-03-14 20:42:30 -07:00
2026-03-14 22:31:51 -07:00
2026-03-14 22:31:51 -07:00
2026-03-01 19:59:24 -08:00
2026-03-02 17:18:15 +11:00
2026-03-14 21:11:37 -07:00
2026-03-13 23:59:12 -07:00
2026-03-14 11:57:44 -07:00
2026-03-14 06:31:32 -07:00
2026-03-12 08:35:45 -07:00
2026-03-10 17:31:00 -07:00
2026-03-15 19:03:34 -07:00
2026-03-12 16:02:35 -07:00
2026-03-13 21:53:54 -07:00
2026-03-14 21:28:51 -07:00
2026-03-14 10:33:58 -07:00
2026-03-14 19:33:59 -07:00
2026-03-14 11:53:16 -07:00
2026-03-14 21:19:22 -07:00
2026-03-13 03:14:04 -07:00
2026-03-14 15:00:45 +03:00
2026-03-08 20:22:33 -07:00
2026-03-13 21:34:01 -07:00
2026-03-15 08:02:29 -07:00
2026-03-09 21:01:40 -07:00
2026-03-01 19:59:24 -08:00
2026-03-11 21:38:29 -07:00
2026-03-09 02:19:32 -07:00
2026-03-11 21:06:54 -07:00
2026-03-15 04:01:56 -07:00
2026-03-01 03:12:37 -05:00
2026-03-06 14:50:57 -08:00
2026-03-12 08:35:45 -07:00
2026-03-12 08:35:45 -07:00
2026-03-13 21:56:12 -07:00
2026-03-13 23:39:51 -07:00
2026-03-10 17:12:34 -07:00
2026-03-05 18:46:30 -08:00
2026-03-14 21:56:00 -07:00
2026-03-09 17:31:54 +03:00
2026-03-14 23:41:20 -07:00
2026-03-14 03:51:28 -07:00
2026-03-12 15:05:42 -04:00
2026-03-12 05:38:19 -07:00
2026-03-12 08:35:45 -07:00
2026-03-08 17:45:45 -07:00
2026-03-11 04:28:31 -07:00
2026-03-14 23:44:47 -07:00
2026-03-14 20:58:12 -07:00
2026-03-13 04:42:26 +03:00
2026-03-14 10:33:32 -07:00
2026-03-14 06:19:28 -07:00
2026-02-26 13:54:20 +03:00
2026-03-09 23:27:19 -07:00
2026-03-14 11:03:25 -07:00
2026-03-14 21:51:27 -07:00
2026-03-14 21:51:27 -07:00