Skip to content

fix(kanban): profile discovery ignores HERMES_HOME in custom-root deployments#19020

Merged
teknium1 merged 2 commits into
NousResearch:mainfrom
jackey8616:fix/19017-incorrect-home-folder-in-kanban-init
May 4, 2026
Merged

fix(kanban): profile discovery ignores HERMES_HOME in custom-root deployments#19020
teknium1 merged 2 commits into
NousResearch:mainfrom
jackey8616:fix/19017-incorrect-home-folder-in-kanban-init

Conversation

@jackey8616

Copy link
Copy Markdown
Contributor

What does this PR do?

list_profiles_on_disk() in kanban_db.py hardcodes Path.home() / ".hermes" / "profiles",
so hermes kanban init always 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 use get_default_hermes_root(),
making profile discovery consistent with how kanban_db_path() and workspaces_root()
were fixed in #18985.

Related Issue

Fixes #19017
Related to #18442, #18985

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

Changes Made

  • hermes_cli/kanban_db.py: replace Path.home() / ".hermes" / "profiles" with
    get_default_hermes_root() / "profiles" in list_profiles_on_disk()
  • tests/hermes_cli/test_kanban_core_functionality.py: add
    monkeypatch.delenv("HERMES_HOME", raising=False) to existing test, and add
    new test_list_profiles_on_disk_custom_root to cover custom HERMES_HOME case

How to Test

  1. 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

  2. Run kanban init with Docker:

    docker run --rm
    -e HERMES_HOME=/data
    -v $(pwd)/data:/data
    nousresearch/hermes-agent
    hermes kanban init

  3. 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

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.6.1

Documentation & Housekeeping

All N/A

jackey8616 added 2 commits May 3, 2026 11:39
…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.
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard area/docker Docker image, Compose, packaging labels May 2, 2026
@teknium1 teknium1 merged commit c030057 into NousResearch:main May 4, 2026
@jackey8616 jackey8616 deleted the fix/19017-incorrect-home-folder-in-kanban-init branch May 4, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docker Docker image, Compose, packaging comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: kanban init profile discovery hardcodes ~/.hermes/profiles instead of using get_default_hermes_root()

3 participants