fix(kanban): profile discovery ignores HERMES_HOME in custom-root deployments#19020
Merged
teknium1 merged 2 commits intoMay 4, 2026
Conversation
…HERMES_HOME list_profiles_on_disk() hardcodes Path.home() / ".hermes" / "profiles", ignoring HERMES_HOME when set to a custom root (e.g. /opt/data). Add test_list_profiles_on_disk_custom_root to cover this case. Related to NousResearch#18442, NousResearch#18985.
Path.home() / ".hermes" / "profiles" breaks custom-root deployments (e.g. HERMES_HOME=/opt/data). Switch to get_default_hermes_root() so profile discovery is consistent with kanban_db_path() and workspaces_root() fixed in NousResearch#18985. Fixes NousResearch#19017. Related to NousResearch#18442, NousResearch#18985.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
list_profiles_on_disk()inkanban_db.pyhardcodesPath.home() / ".hermes" / "profiles",so
hermes kanban initalways reports "No profiles found" on custom-root deployments(e.g. Docker with
HERMES_HOME=/opt/data), even when valid profiles exist under$HERMES_HOME/profiles/.This PR switches
list_profiles_on_disk()to useget_default_hermes_root(),making profile discovery consistent with how
kanban_db_path()andworkspaces_root()were fixed in #18985.
Related Issue
Fixes #19017
Related to #18442, #18985
Type of Change
Changes Made
hermes_cli/kanban_db.py: replacePath.home() / ".hermes" / "profiles"withget_default_hermes_root() / "profiles"inlist_profiles_on_disk()tests/hermes_cli/test_kanban_core_functionality.py: addmonkeypatch.delenv("HERMES_HOME", raising=False)to existing test, and addnew
test_list_profiles_on_disk_custom_rootto cover custom HERMES_HOME caseHow to Test
Create a fresh directory with a profile under a custom root:
mkdir hermes-test && cd hermes-test
mkdir -p data/profiles/my-agent
echo "model: {}" > data/profiles/my-agent/config.yaml
Run kanban init with Docker:
docker run --rm
-e HERMES_HOME=/data
-v $(pwd)/data:/data
nousresearch/hermes-agent
hermes kanban init
Expected output includes:
Discovered 1 profile(s) on disk; any of these can be an --assignee:
my-agent
Before this fix, the output was:
"No profiles found under ~/.hermes/profiles."
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
All N/A