Problem
In Docker deployments, Hermes uses HERMES_HOME as the persistent data root, for example:
At the same time, tool subprocesses may get a different HOME:
This is understandable as a fix for Docker persistence and profile isolation: tools like git, ssh, gh, npm should not write to /root, and different profiles should not share credentials.
The confusing part is that the Hermes main/gateway process can still have a different HOME from the subprocesses it starts.
Example:
Hermes main process:
HOME=/opt/data
HERMES_HOME=/opt/data
Tool subprocess:
HOME=/opt/data/home
HERMES_HOME=/opt/data
This means that within the same active profile, ~ can point to different places depending on where it is expanded.
Why this is a problem
For one profile, I would expect these to agree:
echo "$HOME"
python -c 'from pathlib import Path; print(Path.home())'
python -c 'import os; print(os.path.expanduser("~"))'
and also the HOME seen by terminal tools, background processes, and execute_code.
When they differ, it becomes hard to reason about paths like:
~/.ssh
~/.config/gh
~/.gitconfig
~/workspace
or skill/config paths that use ~.
I agree that different profiles should have isolated homes. But inside a single profile, splitting HOME between Hermes itself and its tools does not seem to provide much benefit. It mostly creates path ambiguity.
For Docker specifically, I think the cleaner isolation boundary is the container itself. If I want stronger isolation between agents/profiles, I would rather run separate containers with separate mounted data directories, instead of relying on different HOME values inside the same container.
Suggested behavior
Keep profile isolation, but make HOME consistent within one profile.
For example, in Docker default profile:
HERMES_HOME=/opt/data
HOME=/opt/data/home
For named profiles:
HERMES_HOME=/opt/data/profiles/<profile>
HOME=/opt/data/profiles/<profile>/home
So the intended model would be:
HERMES_HOME = Hermes state/config root
HOME = user/tool home for this profile
Different profiles should still get different homes. But the same profile should not have two competing HOME values.
Expected invariant
Within one active profile:
main process HOME == subprocess HOME
Across profiles:
profile A HOME != profile B HOME
This keeps the useful isolation boundary at the profile level, while avoiding confusing behavior inside a single profile.
Problem
In Docker deployments, Hermes uses
HERMES_HOMEas the persistent data root, for example:At the same time, tool subprocesses may get a different
HOME:This is understandable as a fix for Docker persistence and profile isolation: tools like
git,ssh,gh,npmshould not write to/root, and different profiles should not share credentials.The confusing part is that the Hermes main/gateway process can still have a different
HOMEfrom the subprocesses it starts.Example:
This means that within the same active profile,
~can point to different places depending on where it is expanded.Why this is a problem
For one profile, I would expect these to agree:
and also the
HOMEseen by terminal tools, background processes, andexecute_code.When they differ, it becomes hard to reason about paths like:
or skill/config paths that use
~.I agree that different profiles should have isolated homes. But inside a single profile, splitting
HOMEbetween Hermes itself and its tools does not seem to provide much benefit. It mostly creates path ambiguity.For Docker specifically, I think the cleaner isolation boundary is the container itself. If I want stronger isolation between agents/profiles, I would rather run separate containers with separate mounted data directories, instead of relying on different HOME values inside the same container.
Suggested behavior
Keep profile isolation, but make
HOMEconsistent within one profile.For example, in Docker default profile:
For named profiles:
So the intended model would be:
Different profiles should still get different homes. But the same profile should not have two competing
HOMEvalues.Expected invariant
Within one active profile:
Across profiles:
This keeps the useful isolation boundary at the profile level, while avoiding confusing behavior inside a single profile.