Skip to content

[Bug]: atomic writes to HERMES_HOME files replace symlinked targets (config.yaml/SOUL.md) #16743

@nilswx

Description

@nilswx

Bug Description

When HERMES_HOME contains symlinks (for example config.yaml symlinked to a git-tracked profile package), Hermes writes to that path via atomic replace and the symlink is replaced by a regular file.

This causes managed package setups to drift: runtime keeps working, but git-tracked source-of-truth is silently detached.

Steps to Reproduce

  1. Create ~/.hermes/config.yaml as a symlink to another file:
ln -s /path/to/tracked/config.yaml ~/.hermes/config.yaml
  1. Trigger any Hermes path that writes config (e.g. gateway /sethome, or settings write path).
  2. Inspect ~/.hermes/config.yaml.

Expected Behavior

If the target path is a symlink, writes should preserve link semantics (or provide an explicit supported mode for managed symlink deployments).

Actual Behavior

Symlink is replaced with a regular file at ~/.hermes/config.yaml.

Affected Component

Config + gateway write paths using atomic replace helpers.

Related

Why this matters

Managed/shared deployments often separate runtime home from package canon using symlinks. Replacing symlinks breaks that contract and causes config/persona drift unless operators add periodic relink scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/configConfig system, migrations, profilescomp/gatewayGateway runner, session dispatch, deliverytype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions