Hermes Agent · accepted commit 4d47891
A child process inherited the wrong profile.
The dashboard had already loaded its own environment. Copying it into a named-profile action gave the child settings before its own profile could load.
action_env = dict(os.environ)Before · excerpt from the removed code
Build the environment for the requested profile.
The fix creates an isolated environment for named profiles, removes profile-managed values and selects the target home. Default-profile behavior stays intact.
action_env = _profile_action_environment(
subcommand, env_overrides
)
# Inside the helper, for named profiles:
for key in profile_keys:
action_env.pop(key, None)
action_env["HERMES_HOME"] = str(target_home)After · excerpts from the accepted change
Test what the child can actually see.
The regression test checks that parent-profile keys are absent, harmless values survive, and the child loads the target profile. The test exercises a subprocess rather than relying only on a mocked environment.
assert child_env["PROFILE_ENV_TEST_BENIGN"] == "keep-me"
assert leaked_key not in child_envRegression test · excerpts, not a standalone program
Keep each agent profile separate
I contributed an accepted Python fix that keeps dashboard actions from inheriting another profile's credentials and settings, with a regression test.
Read the fix and test on GitHub





