dev-agent
9d8efb3504
fix(mcp): pin the active profile's HERMES_HOME into stdio child env
...
The MCP stdio spawner built its child env from an allowlist (_SAFE_ENV_KEYS)
that omits HERMES_HOME, so every stdio MCP child was launched with no
HERMES_HOME at all. Under a multiplexed host / dashboard-desktop backend
serving `--open-profile` (e.g. hermes-serve-dev.service, host home = default,
opened profile = dev) those children resolved to the platform-default home
instead of the served profile:
- any Python child importing hermes_constants tripped
_warn_profile_fallback_once() -> "[HERMES_HOME fallback] HERMES_HOME is
unset but active profile is 'dev' ... Any data this process writes will
land in the wrong profile" (issue #18594 );
- children that DO write (caches/state) landed under the default home.
Pin the ACTIVE profile's home at spawn time via get_hermes_home() (honours the
served-profile contextvar, which does not cross the process boundary;
os.environ only holds the launch profile's home). An explicit server
`env.HERMES_HOME` still wins (applied after).
Verified: tests/tools/test_mcp_stability.py,
tests/tools/test_mcp_connect_secret_scope.py -> 20 passed.
Probe: served scope (override=dev) now yields child HERMES_HOME=.../profiles/dev.
2026-11-02 13:31:06 -08:00
..
2026-10-29 19:03:57 +05:30
2026-10-29 16:58:09 +05:30
2026-10-27 10:56:48 -04:00
2026-10-31 11:33:57 +05:30
2026-10-28 19:35:16 -07:00
2026-10-23 16:04:50 -07:00
2026-10-27 16:30:14 +05:30
2026-10-28 15:28:40 +05:30
2026-10-31 23:05:03 -07:00
2026-10-21 04:12:11 -07:00
2026-10-31 23:05:03 -07:00
2026-10-18 20:50:03 -07:00
2026-11-01 22:05:14 -08:00
2026-10-17 14:11:42 -04:00
2026-10-20 03:19:01 -07:00
2026-10-27 12:16:22 -07:00
2026-10-27 12:16:22 -07:00
2026-10-27 16:30:14 +05:30
2026-10-31 14:33:38 +05:30
2026-10-23 16:04:50 -07:00
2026-10-29 16:58:09 +05:30
2026-10-23 01:43:16 -07:00
2026-10-29 16:58:09 +05:30
2026-10-29 16:58:09 +05:30
2026-10-23 01:41:23 -07:00
2026-10-23 01:43:17 -07:00
2026-10-23 01:43:16 -07:00
2026-10-23 01:43:16 -07:00
2026-10-23 01:43:16 -07:00
2026-10-23 01:42:57 -07:00
2026-10-23 01:41:24 -07:00
2026-10-23 01:41:24 -07:00
2026-10-23 01:41:24 -07:00
2026-10-31 14:33:38 +05:30
2026-10-29 16:58:09 +05:30
2026-10-28 13:12:40 -07:00
2026-10-25 05:32:43 -07:00
2026-10-28 19:00:07 -07:00
2026-10-17 14:51:46 -07:00
2026-10-31 23:05:03 -07:00
2026-10-23 16:04:50 -07:00
2026-10-22 05:26:10 -07:00
2026-10-25 19:14:26 -04:00
2026-10-29 16:58:09 +05:30
2026-10-22 05:26:10 -07:00
2026-10-30 05:54:35 -07:00
2026-10-22 14:37:10 -07:00
2026-10-28 19:35:16 -07:00
2026-11-01 21:11:06 -08:00
2026-10-23 00:37:14 -07:00
2026-10-22 14:37:10 -07:00
2026-10-28 19:35:16 -07:00
2026-10-22 14:37:10 -07:00
2026-10-23 16:04:50 -07:00
2026-10-22 05:26:10 -07:00
2026-10-19 01:31:31 -07:00
2026-10-28 18:54:14 -07:00
2026-10-23 15:33:14 -07:00
2026-10-29 16:58:09 +05:30
2026-10-28 18:54:14 -07:00
2026-10-22 05:26:10 -07:00
2026-11-01 15:47:21 -08:00
2026-10-24 18:44:31 -07:00
2026-10-23 16:04:50 -07:00
2026-10-31 23:05:03 -07:00
2026-10-20 12:30:50 -07:00
2026-10-23 16:04:50 -07:00
2026-10-23 16:04:50 -07:00
2026-10-23 14:01:02 -07:00
2026-10-27 12:57:09 -07:00
2026-10-28 19:35:16 -07:00
2026-11-02 13:31:06 -08:00
2026-10-21 04:12:11 -07:00
2026-10-19 07:27:50 -07:00
2026-10-23 17:40:33 -07:00
2026-10-20 23:36:32 -04:00
2026-10-23 17:39:48 -07:00
2026-10-29 16:58:09 +05:30
2026-10-21 21:39:02 -04:00
2026-10-20 23:36:32 -04:00
2026-10-21 04:12:11 -07:00
2026-10-29 16:58:09 +05:30
2026-10-29 16:58:09 +05:30
2026-10-25 03:00:43 -07:00
2026-10-24 18:44:31 -07:00
2026-10-28 23:07:47 -07:00
2026-10-28 23:07:47 -07:00
2026-11-01 21:12:28 -08:00
2026-10-29 16:58:09 +05:30
2026-10-28 13:10:03 -07:00
2026-10-29 16:58:09 +05:30
2026-10-28 13:10:03 -07:00
2026-10-29 16:58:09 +05:30
2026-10-30 15:45:49 +05:30
2026-10-18 12:27:21 +02:00
2026-10-23 16:04:50 -07:00
2026-10-23 01:42:27 -07:00
2026-10-25 19:26:49 -07:00
2026-10-25 18:54:09 -07:00
2026-10-23 16:04:50 -07:00
2026-10-18 00:47:38 -07:00
2026-10-24 17:11:13 -07:00
2026-11-01 15:47:21 -08:00
2026-11-01 15:47:21 -08:00
2026-10-24 17:11:13 -07:00
2026-11-01 15:47:21 -08:00
2026-10-28 21:24:43 -07:00
2026-10-27 10:56:48 -04:00
2026-10-28 21:24:43 -07:00
2026-10-27 10:56:48 -04:00
2026-10-18 00:47:38 -07:00
2026-10-18 00:47:38 -07:00
2026-10-18 00:47:38 -07:00
2026-10-24 04:01:10 -07:00
2026-10-22 05:26:10 -07:00
2026-10-24 18:44:31 -07:00
2026-10-17 21:49:14 -07:00
2026-10-31 12:56:22 +05:30
2026-10-22 05:26:10 -07:00
2026-11-01 21:11:06 -08:00
2026-10-31 11:33:57 +05:30
2026-11-01 15:47:21 -08:00
2026-10-25 19:14:26 -04:00
2026-10-24 18:48:01 -07:00
2026-11-01 15:47:21 -08:00
2026-10-22 02:53:12 -04:00
2026-10-23 16:04:50 -07:00
2026-10-28 13:09:00 -07:00
2026-10-23 15:33:14 -07:00
2026-10-24 18:55:33 -07:00
2026-10-20 03:22:11 -07:00
2026-10-24 18:55:33 -07:00
2026-10-23 16:04:50 -07:00
2026-10-29 16:58:09 +05:30
2026-10-25 15:58:23 -07:00
2026-10-25 13:07:21 -07:00
2026-10-25 16:39:44 -07:00
2026-10-27 16:37:44 -04:00
2026-10-23 16:04:50 -07:00
2026-10-23 01:41:24 -07:00
2026-10-27 16:30:14 +05:30
2026-10-29 16:58:09 +05:30
2026-10-28 13:54:02 -07:00
2026-10-28 13:54:02 -07:00
2026-10-28 13:13:12 -07:00
2026-10-23 16:04:50 -07:00
2026-10-25 18:54:09 -07:00
2026-10-23 16:04:50 -07:00
2026-10-23 16:04:50 -07:00