From f1d3afb15116ecd987cea06877d88b4fc329cd4c Mon Sep 17 00:00:00 2001 From: islam666 Date: Fri, 5 Jun 2026 05:59:16 +0000 Subject: [PATCH] fix(profiles): skip 'default' in named profiles scan to prevent duplicates When ~/.hermes/profiles/default/ exists as a directory, list_profiles() returns 'default' twice: once as the built-in default profile (~/.hermes) and once from the directory scan (~/.hermes/profiles/default). This causes the cron dashboard API (profile=all) to read the same jobs.json twice, showing every default-profile job duplicated in the UI. Fix: skip name=='default' in the named profiles loop, since it's already added as the built-in default at the top of the function. Fixes #39346 --- hermes_cli/profiles.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hermes_cli/profiles.py b/hermes_cli/profiles.py index f2fc0112be3..bf85c361805 100644 --- a/hermes_cli/profiles.py +++ b/hermes_cli/profiles.py @@ -683,6 +683,8 @@ def list_profiles() -> List[ProfileInfo]: if not entry.is_dir(): continue name = entry.name + if name == "default": + continue # already added as the built-in default above if not _PROFILE_ID_RE.match(name): continue model, provider = _read_config_model(entry)