hermes - 💡(How to fix) Fix [Bug]: Agent init config normalization overwrites user-set values with defaults

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When the Hermes Agent process restarts, the config normalization during init overwrites user-customized values in ~/.hermes/config.yaml with schema defaults. This is a different code path from the user-triggered config writes that were fixed in #3522 / #3596 / #4775.

Root Cause

When the Hermes Agent process restarts, the config normalization during init overwrites user-customized values in ~/.hermes/config.yaml with schema defaults. This is a different code path from the user-triggered config writes that were fixed in #3522 / #3596 / #4775.

Fix Action

Workaround

Created a recovery script (~/.hermes/scripts/protect_config.py + cron every 5 min) that re-patches the values after normalization overwrites them. This is a bandaid, not a fix.

RAW_BUFFERClick to expand / collapse

Environment

  • Hermes Agent v0.13.0 (v2026.5.7), 496 commits behind main
  • macOS 26.4.1
  • Python 3.11.15

Summary

When the Hermes Agent process restarts, the config normalization during init overwrites user-customized values in ~/.hermes/config.yaml with schema defaults. This is a different code path from the user-triggered config writes that were fixed in #3522 / #3596 / #4775.

Steps to Reproduce

  1. Set custom values in config.yaml:
    • checkpoints.enabled: true
    • approvals.mode: manual
    • user_char_limit: 2200
    • Per-model context_length: 1000000 under custom_providers
  2. Restart Hermes Agent (process restart, not hermes setup or config commands)
  3. Observe config.yaml being modified during init

Actual Behavior

Config normalization silently resets user values to schema defaults:

  • checkpoints.enabled: truefalse
  • approvals.mode: manualfalse
  • user_char_limit: 22003000
  • context_length: 1000000128000

The init also adds schema-mandatory fields that were intentionally omitted (api_key, api_mode, name, model), which is less harmful but still undesirable.

Expected Behavior

Init-time config normalization should preserve existing user-set values when they differ from defaults, or at minimum not overwrite them silently.

Evidence

Verified by diffing config.yaml against a backup from before the agent restart. Timestamps from agent.log confirm the overwrite occurred at 10:35 during agent init, not during any user-triggered config operation.

Workaround

Created a recovery script (~/.hermes/scripts/protect_config.py + cron every 5 min) that re-patches the values after normalization overwrites them. This is a bandaid, not a fix.

Related

  • #3522 (closed — fix for hermes setup path)
  • #4775 (closed — fix for command-triggered save_config path)
  • PR #3596 (merged — raw vs effective config split)

These fixes cover user-triggered paths but the init-time normalization path still overwrites custom values.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING