hermes - ✅(Solved) Fix [Bug]: kanban init profile discovery hardcodes ~/.hermes/profiles instead of using get_default_hermes_root() [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#19017Fetched 2026-05-03 04:52:53
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×2referenced ×1

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fix / Workaround

The gateway hosts an embedded dispatcher that ticks every 60 seconds by default (config: kanban.dispatch_interval_seconds). Without a running gateway, tasks stay in 'ready' forever.


The gateway hosts an embedded dispatcher that ticks every 60 seconds
by default (config: kanban.dispatch_interval_seconds). Without a
running gateway, tasks stay in 'ready' forever.

PR fix notes

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

Description (problem / solution / changelog)

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

<!-- Complete these before requesting review. -->

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<!-- e.g. Ubuntu 24.04, macOS 15.2, Windows 11 -->

Documentation & Housekeeping

All N/A

Changed files

  • hermes_cli/kanban_db.py (modified, +2/-1)
  • tests/hermes_cli/test_kanban_core_functionality.py (modified, +19/-4)

PR #19030: fix(kanban): use get_default_hermes_root() for profile discovery

Description (problem / solution / changelog)

Fix: kanban init profile discovery hardcodes ~/.hermes/profiles

Problem

list_profiles_on_disk() in kanban_db.py hardcoded Path.home() / ".hermes" / "profiles", so hermes kanban init always reported "No profiles found" on custom-root deployments (e.g., HERMES_HOME=/data in Docker).

This is inconsistent with kanban_db_path() and workspaces_root(), which were already fixed to use get_hermes_home() in #18985.

Solution

Replace the hardcoded path with get_default_hermes_root() / "profiles", consistent with how kanban_db_path() and workspaces_root() already resolve paths. Falls back to Path.home() / ".hermes" / "profiles" if hermes_constants is unavailable.

Testing

  • Custom-root deployments (HERMES_HOME override) will now correctly discover profiles under the custom root
  • Default deployments (no HERMES_HOME override) behave identically since get_default_hermes_root() returns Path.home() / ".hermes" in that case
  • The fallback path matches the old behavior exactly

Fixes #19017

Changed files

  • hermes_cli/kanban_db.py (modified, +10/-7)

Code Example

mkdir hermes-test && cd hermes-test
mkdir -p data/profiles/my-agent
echo "model: {}" > data/profiles/my-agent/config.yaml

---

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

---

Fixing ownership of /data to hermes (10000)
Dropping root privileges
Syncing bundled skills into ~/.hermes/skills/ ...
  + yuanbao
  + dogfood
  ....
Done: 89 new, 0 updated, 0 unchanged. 89 total bundled.
Kanban DB initialized at /data/kanban.db

No profiles found under ~/.hermes/profiles/. <---------- HERE
Create one with `hermes -p <name> setup` before assigning tasks.

Next step: start the gateway so ready tasks actually get picked up.
  hermes gateway start

The gateway hosts an embedded dispatcher that ticks every 60 seconds
by default (config: kanban.dispatch_interval_seconds). Without a
running gateway, tasks stay in 'ready' forever.

---

Dropping root privileges
Syncing bundled skills into ~/.hermes/skills/ ...

Done: 0 new, 0 updated, 89 unchanged. 89 total bundled.
Kanban DB initialized at /data/kanban.db

Discovered 1 profile(s) on disk; any of these can be an --assignee:
  my-agent
^^^^^^^^^^^^^^^^^^^^^^^ HERE

Next step: start the gateway so ready tasks actually get picked up.
  hermes gateway start

The gateway hosts an embedded dispatcher that ticks every 60 seconds
by default (config: kanban.dispatch_interval_seconds). Without a
running gateway, tasks stay in 'ready' forever.

---

Debug report uploaded:
  Report  https://paste.rs/82rSk

---
RAW_BUFFERClick to expand / collapse

Bug Description

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. HERMES_HOME=/opt/data).

Steps to Reproduce

  1. Create a fresh working directory:
mkdir hermes-test && cd hermes-test
mkdir -p data/profiles/my-agent
echo "model: {}" > data/profiles/my-agent/config.yaml
  1. Build and run with Docker, mounting the data directory as HERMES_HOME:
docker run --rm \
  -e HERMES_HOME=/data \
  -v $(pwd)/data:/data \
  nousresearch/hermes-agent:latest \
  hermes kanban init
  1. Observe the output:
Fixing ownership of /data to hermes (10000)
Dropping root privileges
Syncing bundled skills into ~/.hermes/skills/ ...
  + yuanbao
  + dogfood
  ....
Done: 89 new, 0 updated, 0 unchanged. 89 total bundled.
Kanban DB initialized at /data/kanban.db

No profiles found under ~/.hermes/profiles/. <---------- HERE
Create one with `hermes -p <name> setup` before assigning tasks.

Next step: start the gateway so ready tasks actually get picked up.
  hermes gateway start

The gateway hosts an embedded dispatcher that ticks every 60 seconds
by default (config: kanban.dispatch_interval_seconds). Without a
running gateway, tasks stay in 'ready' forever.

Expected Behavior


Dropping root privileges
Syncing bundled skills into ~/.hermes/skills/ ...

Done: 0 new, 0 updated, 89 unchanged. 89 total bundled.
Kanban DB initialized at /data/kanban.db

Discovered 1 profile(s) on disk; any of these can be an --assignee:
  my-agent
^^^^^^^^^^^^^^^^^^^^^^^ HERE

Next step: start the gateway so ready tasks actually get picked up.
  hermes gateway start

The gateway hosts an embedded dispatcher that ticks every 60 seconds
by default (config: kanban.dispatch_interval_seconds). Without a
running gateway, tasks stay in 'ready' forever.

Should discover profiles under get_default_hermes_root() / "profiles", consistent with how kanban_db_path() and workspaces_root() were fixed in #18985.

Actual Behavior

The profile is not found.

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Debug report uploaded:
  Report  https://paste.rs/82rSk

Operating System

macOS 15.6.1

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

list_profiles_on_disk() uses Path.home() / ".hermes" / "profiles" instead of get_default_hermes_root() / "profiles".

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The list_profiles_on_disk() function should use get_default_hermes_root() / "profiles" instead of Path.home() / ".hermes" / "profiles" to correctly discover profiles in custom-root deployments.

Guidance

  • Update the list_profiles_on_disk() function in kanban_db.py to use get_default_hermes_root() / "profiles" as the path to discover profiles.
  • Verify that the get_default_hermes_root() function correctly returns the custom root directory when HERMES_HOME is set.
  • Test the updated function with the provided steps to reproduce the issue to ensure that profiles are correctly discovered.
  • Consider adding a check to ensure that the HERMES_HOME environment variable is properly set and used in the get_default_hermes_root() function.

Example

import os
from pathlib import Path

def list_profiles_on_disk():
    # Use get_default_hermes_root() instead of Path.home()
    profiles_dir = get_default_hermes_root() / "profiles"
    # ... rest of the function remains the same ...

Notes

The fix assumes that the get_default_hermes_root() function is correctly implemented to return the custom root directory when HERMES_HOME is set. If this function is not correctly implemented, additional changes may be needed.

Recommendation

Apply the workaround by updating the list_profiles_on_disk() function to use get_default_hermes_root() / "profiles" as the path to discover profiles, as this should correctly fix the issue in custom-root deployments.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: kanban init profile discovery hardcodes ~/.hermes/profiles instead of using get_default_hermes_root() [2 pull requests, 1 participants]