Skip to content

The agent that grows with you

fix: a canary user with an unfinished setup guide gets onboarding again

alt-glitchf9eeca9d3cd5
diff --git a/hermes_cli/onboarding_migrations.py b/hermes_cli/onboarding_migrations.py
index 8c51de023a1..07cbc4190b1 100644
--- a/hermes_cli/onboarding_migrations.py
+++ b/hermes_cli/onboarding_migrations.py
@@ -50,8 +50,11 @@ def release_setup_profiles() -> None:
if is_seen(read_user_config_raw(config_path), _RELEASED_FLAG):
return
marked = {path: _read_marker(path) for path in _iter_named_profile_dirs() if (path / SETUP_MARKER).is_file()}
- if _old_guide_done(marked.values(), config_path):
- _settle_run(config_path)
+ done = _old_guide_done(marked.values(), config_path)
+ if done or marked:
+ # Settled before any marker goes: once released, the setup profile counts as install
+ # history, so an unset run would keep onboarding shut for a user who never finished it.
+ _settle_run(config_path, not done)
# A profile whose identity did not reach the shared store keeps its marker and the latch stays
# open, so the next boot retries instead of leaving the install without that identity.
unshared = {path for path in marked if not _share_identity(path)}
@@ -82,7 +85,7 @@ def _read_marker(path: Path) -> dict:
def _old_guide_done(markers, config_path: Path) -> bool:
- """The user finished or skipped the agentic guide, so the questionnaire must not open for them."""
+ """The user finished or skipped the agentic guide, so onboarding must not open for them again."""
from agent.onboarding import is_seen
from hermes_cli.config import read_user_config_raw
@@ -92,13 +95,13 @@ def _old_guide_done(markers, config_path: Path) -> bool:
for path in {config_path, get_hermes_home() / "config.yaml"})
-def _settle_run(config_path: Path) -> None:
- """``onboarding.run = false`` unless the root config already says what it wants."""
+def _settle_run(config_path: Path, run: bool) -> None:
+ """``onboarding.run = run`` unless the root config already says what it wants."""
from hermes_cli.config import read_user_config_raw
section = read_user_config_raw(config_path).get("onboarding")
if not isinstance(section, dict) or not isinstance(section.get("run"), bool):
- _write_run(config_path, False)
+ _write_run(config_path, run)
def _write_run(config_path: Path, value: bool) -> None: