fix(kanban): inject HERMES_HOME into worker subprocess env#23356
Closed
TurgutKural wants to merge 1 commit into
Closed
fix(kanban): inject HERMES_HOME into worker subprocess env#23356TurgutKural wants to merge 1 commit into
TurgutKural wants to merge 1 commit into
Conversation
Default spawn did not propagate HERMES_HOME when forking kanban workers. The worker's env is copied from the parent via dict(os.environ), so HERMES_HOME is absent. When the child then starts hermes -p <profile>, the CLI's _apply_profile_override() runs before hermes_constants is imported and get_hermes_home() falls back to ~/.hermes (the default profile root), silently ignoring the profile's config.yaml. Profile- scoped fallback_providers, toolsets, and agent settings are therefore never applied to kanban workers. The fix injects HERMES_HOME into the worker's env using resolve_profile_env(profile_arg) so the child reads the correct profile directory instead of the default root.
kshitijk4poor
added a commit
that referenced
this pull request
May 11, 2026
kshitijk4poor
added a commit
that referenced
this pull request
May 11, 2026
The _default_spawn HERMES_HOME injection (PR #23356) calls resolve_profile_env which raises FileNotFoundError when the profile dir doesn't exist. In production the profile always exists (workers are only dispatched for live profiles), but tests with isolated HERMES_HOME never create profile dirs. Catch FileNotFoundError and fall through — HERMES_PROFILE is still set below, so the worker CLI resolves the profile at startup.
Collaborator
|
Merged via salvage PR #23791. Your commits were cherry-picked onto current main with your authorship preserved in git log. Thanks for the fix! |
rmulligan
pushed a commit
to rmulligan/hermes-agent
that referenced
this pull request
May 11, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath), NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban bug-fix batch salvage.
rmulligan
pushed a commit
to rmulligan/hermes-agent
that referenced
this pull request
May 11, 2026
The _default_spawn HERMES_HOME injection (PR NousResearch#23356) calls resolve_profile_env which raises FileNotFoundError when the profile dir doesn't exist. In production the profile always exists (workers are only dispatched for live profiles), but tests with isolated HERMES_HOME never create profile dirs. Catch FileNotFoundError and fall through — HERMES_PROFILE is still set below, so the worker CLI resolves the profile at startup.
JinyuID
pushed a commit
to JinyuID/hermes-agent
that referenced
this pull request
May 11, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath), NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban bug-fix batch salvage.
JinyuID
pushed a commit
to JinyuID/hermes-agent
that referenced
this pull request
May 11, 2026
The _default_spawn HERMES_HOME injection (PR NousResearch#23356) calls resolve_profile_env which raises FileNotFoundError when the profile dir doesn't exist. In production the profile always exists (workers are only dispatched for live profiles), but tests with isolated HERMES_HOME never create profile dirs. Catch FileNotFoundError and fall through — HERMES_PROFILE is still set below, so the worker CLI resolves the profile at startup.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath), NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban bug-fix batch salvage.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
The _default_spawn HERMES_HOME injection (PR NousResearch#23356) calls resolve_profile_env which raises FileNotFoundError when the profile dir doesn't exist. In production the profile always exists (workers are only dispatched for live profiles), but tests with isolated HERMES_HOME never create profile dirs. Catch FileNotFoundError and fall through — HERMES_PROFILE is still set below, so the worker CLI resolves the profile at startup.
jsboige
pushed a commit
to jsboige/hermes-agent
that referenced
this pull request
May 14, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath), NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban bug-fix batch salvage.
jsboige
pushed a commit
to jsboige/hermes-agent
that referenced
this pull request
May 14, 2026
The _default_spawn HERMES_HOME injection (PR NousResearch#23356) calls resolve_profile_env which raises FileNotFoundError when the profile dir doesn't exist. In production the profile always exists (workers are only dispatched for live profiles), but tests with isolated HERMES_HOME never create profile dirs. Catch FileNotFoundError and fall through — HERMES_PROFILE is still set below, so the worker CLI resolves the profile at startup.
AlexFoxD
pushed a commit
to AlexFoxD/hermes-agent
that referenced
this pull request
May 21, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath), NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban bug-fix batch salvage.
AlexFoxD
pushed a commit
to AlexFoxD/hermes-agent
that referenced
this pull request
May 21, 2026
The _default_spawn HERMES_HOME injection (PR NousResearch#23356) calls resolve_profile_env which raises FileNotFoundError when the profile dir doesn't exist. In production the profile always exists (workers are only dispatched for live profiles), but tests with isolated HERMES_HOME never create profile dirs. Catch FileNotFoundError and fall through — HERMES_PROFILE is still set below, so the worker CLI resolves the profile at startup.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath), NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban bug-fix batch salvage.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
The _default_spawn HERMES_HOME injection (PR NousResearch#23356) calls resolve_profile_env which raises FileNotFoundError when the profile dir doesn't exist. In production the profile always exists (workers are only dispatched for live profiles), but tests with isolated HERMES_HOME never create profile dirs. Catch FileNotFoundError and fall through — HERMES_PROFILE is still set below, so the worker CLI resolves the profile at startup.
Seven74AI
pushed a commit
to Seven74AI/hermes-agent
that referenced
this pull request
Jun 13, 2026
For PRs NousResearch#23206 (Frowtek), NousResearch#23252 (Sylw3ster), NousResearch#23358 (dmnkhorvath), NousResearch#23659 (smwbev), and NousResearch#23356 (TurgutKural) — all part of the kanban bug-fix batch salvage.
Seven74AI
pushed a commit
to Seven74AI/hermes-agent
that referenced
this pull request
Jun 13, 2026
The _default_spawn HERMES_HOME injection (PR NousResearch#23356) calls resolve_profile_env which raises FileNotFoundError when the profile dir doesn't exist. In production the profile always exists (workers are only dispatched for live profiles), but tests with isolated HERMES_HOME never create profile dirs. Catch FileNotFoundError and fall through — HERMES_PROFILE is still set below, so the worker CLI resolves the profile at startup.
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.
Bug
Kanban workers spawned via
_default_spawn()do not read their profile-scopedconfig.yaml.When a worker is forked, its environment is copied via
dict(os.environ). This copy does not containHERMES_HOME. When the child then startshermes -p <profile>, the CLI's_apply_profile_override()runs beforehermes_constantsis imported. SinceHERMES_HOMEis absent,get_hermes_home()falls back to~/.hermes(the default profile root) instead of~/.hermes/profiles/<profile>.The practical effect: any profile-scoped setting in
~/.hermes/profiles/<profile>/config.yamlis invisible to kanban workers. Most critically,fallback_providersis ignored — workers only see the root config wherefallback_providers: [].Fix
Inject
HERMES_HOMEinto the worker's env usingresolve_profile_env(profile_arg):Added immediately after
env = dict(os.environ)in_default_spawn().Testing
fallback_providersin~/.hermes/profiles/<profile>/config.yaml🔄 Fallback chain) on startuphermes logs | grep fallbackto verify the chain is populatedRelated
provider-fallback-config-bug.mdin profile skills