Skip to content

fix(config): shipped template no longer enables session auto-reset - #67772

Merged
teknium1 merged 1 commit into
mainfrom
fix/session-reset-template-default
Jul 20, 2026
Merged

fix(config): shipped template no longer enables session auto-reset#67772
teknium1 merged 1 commit into
mainfrom
fix/session-reset-template-default

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Fresh installs no longer get session auto-reset silently enabled: the shipped config template (cli-config.yaml.example) now seeds session_reset.mode: none, matching the runtime default from #60194.

Root cause of the "auto-reset with nothing in my config" reports (Luciano, July 2026): #60194 flipped SessionResetPolicy's code default to "none", but the template still shipped mode: both. Every install path — scripts/install.sh, scripts/install.ps1, docker/stage2-hook.sh, and hermes doctor — copies the template verbatim to ~/.hermes/config.yaml, so new installs got an EXPLICIT mode: both that overrides the code default. Users then hit the 24h-idle reset banner while their config "had nothing enabling it" (nobody greps their config for settings the installer planted).

Changes

  • cli-config.yaml.example: session_reset.mode bothnone; comments rewritten to describe auto-reset as opt-in (and no longer recommend both)
  • docs/session-lifecycle.md: appendix example updated to match the real default
  • tests/gateway/test_config.py: 4 invariant tests in TestLoadGatewayConfig

Validation

Scenario Before After
Fresh install (template-seeded config.yaml) mode: both — 24h idle reset ON mode: none
No config.yaml at all none (already correct) none (pinned by test)
session_reset: block without mode none (already correct) none (pinned by test)
Explicit mode: idle opt-in honored honored (pinned by test)

The template test loads the actual cli-config.yaml.example through load_gateway_config() — if the template ever re-enables resets, CI fails. 117/117 tests in tests/gateway/test_config.py pass via scripts/run_tests.sh.

Remaining ways an existing user still sees resets (not bugs, informational): pre-existing config.yaml seeded from the old template (explicit user data — we honor it), legacy ~/.hermes/gateway.json with a default_reset_policy, or a pre-v2026.7.7 runtime that was never restarted.

Infographic

session-reset-template-default

#60194 flipped SessionResetPolicy's default to mode: none, but
cli-config.yaml.example still shipped session_reset.mode: both. Every
install path (install.sh, install.ps1, docker stage2-hook, hermes
doctor) copies the template verbatim to ~/.hermes/config.yaml, so fresh
installs got an EXPLICIT mode: both that overrides the code default —
users hit 24h-idle resets with 'nothing' in their config enabling it.

- cli-config.yaml.example: session_reset.mode both -> none, comments
  rewritten to describe auto-reset as opt-in
- docs/session-lifecycle.md: appendix example updated to match
- tests/gateway/test_config.py: invariant tests — template seed, absent
  config, and mode-less session_reset block all resolve to mode none;
  explicit opt-in still honored
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/gateway Gateway runner, session dispatch, delivery area/config Config system, migrations, profiles sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades labels Jul 20, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to merged #60194 and the remaining session-reset family in #61052. This patch fixes the distinct fresh-install template override that continued to seed mode: both after the runtime default changed to none.

@teknium1
teknium1 merged commit 0d7fad7 into main Jul 20, 2026
33 checks passed
@teknium1
teknium1 deleted the fix/session-reset-template-default branch July 20, 2026 06:33
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…ousResearch#67772)

NousResearch#60194 flipped SessionResetPolicy's default to mode: none, but
cli-config.yaml.example still shipped session_reset.mode: both. Every
install path (install.sh, install.ps1, docker stage2-hook, hermes
doctor) copies the template verbatim to ~/.hermes/config.yaml, so fresh
installs got an EXPLICIT mode: both that overrides the code default —
users hit 24h-idle resets with 'nothing' in their config enabling it.

- cli-config.yaml.example: session_reset.mode both -> none, comments
  rewritten to describe auto-reset as opt-in
- docs/session-lifecycle.md: appendix example updated to match
- tests/gateway/test_config.py: invariant tests — template seed, absent
  config, and mode-less session_reset block all resolve to mode none;
  explicit opt-in still honored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config Config system, migrations, profiles comp/gateway Gateway runner, session dispatch, delivery P2 Medium — degraded but workaround exists sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:risk-session-state Sweeper risk: may lose/corrupt/mis-associate session or context state type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants