fix(run_agent): background review fork inherits parent's live runtime#16099
Merged
Conversation
The background memory/skill review (_spawn_background_review) has always forked a new AIAgent passing only model and provider, then relied on AIAgent.__init__ to re-resolve credentials from env vars. This works for users with keys in ~/.hermes/.env but silently falls back to env-var auto-resolution in all cases, which fails for OAuth-only providers, session-scoped creds, and credential-pool setups where auth can't be reconstructed from env. This used to be invisible -- failures were swallowed via logger.debug(). PR 8a2506a (Apr 24) surfaced auxiliary failures to the user, which made the stale bug visible as: "Auxiliary background review failed: No LLM provider configured" Fix: pass api_key, base_url, api_mode, and credential_pool from the parent's live runtime into the fork -- matching how every other auxiliary path (compression, memory flush, vision, session search) already inherits the parent's credentials via _current_main_runtime().
Contributor
🚨 CRITICAL Supply Chain Risk DetectedThis PR contains a pattern that has been used in real supply chain attacks. A maintainer must review the flagged code carefully before merging. 🚨 CRITICAL: Install-hook file added or modifiedThese files can execute code during package installation or interpreter startup. Files: Scanner only fires on high-signal indicators: .pth files, base64+exec/eval combos, subprocess with encoded commands, or install-hook files. Low-signal warnings were removed intentionally — if you're seeing this comment, the finding is worth inspecting. |
teknium1
added a commit
that referenced
this pull request
Apr 26, 2026
Background review fork now inherits session_id, credential_pool, and status_callback from the parent (added in #16099 after this PR was written). Extend the bare-agent helper so the regression test keeps reaching the cleanup assertions instead of failing in the runtime resolver. Signed-off-by: Teknium <8425893+teknium1@users.noreply.github.com>
This was referenced Apr 26, 2026
5 tasks
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…NousResearch#16099) The background memory/skill review (_spawn_background_review) has always forked a new AIAgent passing only model and provider, then relied on AIAgent.__init__ to re-resolve credentials from env vars. This works for users with keys in ~/.hermes/.env but silently falls back to env-var auto-resolution in all cases, which fails for OAuth-only providers, session-scoped creds, and credential-pool setups where auth can't be reconstructed from env. This used to be invisible -- failures were swallowed via logger.debug(). PR f2db1d3 (Apr 24) surfaced auxiliary failures to the user, which made the stale bug visible as: "Auxiliary background review failed: No LLM provider configured" Fix: pass api_key, base_url, api_mode, and credential_pool from the parent's live runtime into the fork -- matching how every other auxiliary path (compression, memory flush, vision, session search) already inherits the parent's credentials via _current_main_runtime().
ulasbilgen
pushed a commit
to ulasbilgen/hermes-adhd-agent
that referenced
this pull request
May 1, 2026
…search#16099 Background review fork now inherits session_id, credential_pool, and status_callback from the parent (added in NousResearch#16099 after this PR was written). Extend the bare-agent helper so the regression test keeps reaching the cleanup assertions instead of failing in the runtime resolver. Signed-off-by: Teknium <8425893+teknium1@users.noreply.github.com>
donald131
pushed a commit
to donald131/hermes-agent
that referenced
this pull request
May 2, 2026
…NousResearch#16099) The background memory/skill review (_spawn_background_review) has always forked a new AIAgent passing only model and provider, then relied on AIAgent.__init__ to re-resolve credentials from env vars. This works for users with keys in ~/.hermes/.env but silently falls back to env-var auto-resolution in all cases, which fails for OAuth-only providers, session-scoped creds, and credential-pool setups where auth can't be reconstructed from env. This used to be invisible -- failures were swallowed via logger.debug(). PR 8a2506a (Apr 24) surfaced auxiliary failures to the user, which made the stale bug visible as: "Auxiliary background review failed: No LLM provider configured" Fix: pass api_key, base_url, api_mode, and credential_pool from the parent's live runtime into the fork -- matching how every other auxiliary path (compression, memory flush, vision, session search) already inherits the parent's credentials via _current_main_runtime().
donald131
pushed a commit
to donald131/hermes-agent
that referenced
this pull request
May 2, 2026
…search#16099 Background review fork now inherits session_id, credential_pool, and status_callback from the parent (added in NousResearch#16099 after this PR was written). Extend the bare-agent helper so the regression test keeps reaching the cleanup assertions instead of failing in the runtime resolver. Signed-off-by: Teknium <8425893+teknium1@users.noreply.github.com>
5 tasks
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…NousResearch#16099) The background memory/skill review (_spawn_background_review) has always forked a new AIAgent passing only model and provider, then relied on AIAgent.__init__ to re-resolve credentials from env vars. This works for users with keys in ~/.hermes/.env but silently falls back to env-var auto-resolution in all cases, which fails for OAuth-only providers, session-scoped creds, and credential-pool setups where auth can't be reconstructed from env. This used to be invisible -- failures were swallowed via logger.debug(). PR 8a2506a (Apr 24) surfaced auxiliary failures to the user, which made the stale bug visible as: "Auxiliary background review failed: No LLM provider configured" Fix: pass api_key, base_url, api_mode, and credential_pool from the parent's live runtime into the fork -- matching how every other auxiliary path (compression, memory flush, vision, session search) already inherits the parent's credentials via _current_main_runtime().
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
…search#16099 Background review fork now inherits session_id, credential_pool, and status_callback from the parent (added in NousResearch#16099 after this PR was written). Extend the bare-agent helper so the regression test keeps reaching the cleanup assertions instead of failing in the runtime resolver. Signed-off-by: Teknium <8425893+teknium1@users.noreply.github.com>
dannyJ848
pushed a commit
to dannyJ848/hermes-agent
that referenced
this pull request
May 17, 2026
…NousResearch#16099) The background memory/skill review (_spawn_background_review) has always forked a new AIAgent passing only model and provider, then relied on AIAgent.__init__ to re-resolve credentials from env vars. This works for users with keys in ~/.hermes/.env but silently falls back to env-var auto-resolution in all cases, which fails for OAuth-only providers, session-scoped creds, and credential-pool setups where auth can't be reconstructed from env. This used to be invisible -- failures were swallowed via logger.debug(). PR 5c90b86 (Apr 24) surfaced auxiliary failures to the user, which made the stale bug visible as: "Auxiliary background review failed: No LLM provider configured" Fix: pass api_key, base_url, api_mode, and credential_pool from the parent's live runtime into the fork -- matching how every other auxiliary path (compression, memory flush, vision, session search) already inherits the parent's credentials via _current_main_runtime().
dannyJ848
pushed a commit
to dannyJ848/hermes-agent
that referenced
this pull request
May 17, 2026
…search#16099 Background review fork now inherits session_id, credential_pool, and status_callback from the parent (added in NousResearch#16099 after this PR was written). Extend the bare-agent helper so the regression test keeps reaching the cleanup assertions instead of failing in the runtime resolver. Signed-off-by: Teknium <8425893+teknium1@users.noreply.github.com>
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…NousResearch#16099) The background memory/skill review (_spawn_background_review) has always forked a new AIAgent passing only model and provider, then relied on AIAgent.__init__ to re-resolve credentials from env vars. This works for users with keys in ~/.hermes/.env but silently falls back to env-var auto-resolution in all cases, which fails for OAuth-only providers, session-scoped creds, and credential-pool setups where auth can't be reconstructed from env. This used to be invisible -- failures were swallowed via logger.debug(). PR 8a2506a (Apr 24) surfaced auxiliary failures to the user, which made the stale bug visible as: "Auxiliary background review failed: No LLM provider configured" Fix: pass api_key, base_url, api_mode, and credential_pool from the parent's live runtime into the fork -- matching how every other auxiliary path (compression, memory flush, vision, session search) already inherits the parent's credentials via _current_main_runtime().
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
…search#16099 Background review fork now inherits session_id, credential_pool, and status_callback from the parent (added in NousResearch#16099 after this PR was written). Extend the bare-agent helper so the regression test keeps reaching the cleanup assertions instead of failing in the runtime resolver. Signed-off-by: Teknium <8425893+teknium1@users.noreply.github.com>
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…NousResearch#16099) The background memory/skill review (_spawn_background_review) has always forked a new AIAgent passing only model and provider, then relied on AIAgent.__init__ to re-resolve credentials from env vars. This works for users with keys in ~/.hermes/.env but silently falls back to env-var auto-resolution in all cases, which fails for OAuth-only providers, session-scoped creds, and credential-pool setups where auth can't be reconstructed from env. This used to be invisible -- failures were swallowed via logger.debug(). PR b691123 (Apr 24) surfaced auxiliary failures to the user, which made the stale bug visible as: "Auxiliary background review failed: No LLM provider configured" Fix: pass api_key, base_url, api_mode, and credential_pool from the parent's live runtime into the fork -- matching how every other auxiliary path (compression, memory flush, vision, session search) already inherits the parent's credentials via _current_main_runtime().
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
…search#16099 Background review fork now inherits session_id, credential_pool, and status_callback from the parent (added in NousResearch#16099 after this PR was written). Extend the bare-agent helper so the regression test keeps reaching the cleanup assertions instead of failing in the runtime resolver. Signed-off-by: Teknium <8425893+teknium1@users.noreply.github.com>
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.
Summary
Background review now uses the parent agent's live credentials instead of re-resolving from env vars — fixes the
⚠ Auxiliary background review failed: No LLM provider configuredwarning for users whose main-agent auth isn't reconstructable from environment alone (OAuth-only providers, credential pools, session-scoped creds).Root cause is old (commit 470d89c, Mar 20). It was invisible until #PR 8a2506a (Apr 24) promoted auxiliary failure logging from
logger.debugto a user-visible warning.Changes
run_agent.py_spawn_background_review: passapi_key,base_url,api_mode, andcredential_poolfrom_current_main_runtime()into the forked AIAgent. Every other auxiliary path (compression, memory flush, vision, session search) already does this.Validation
_current_main_runtime()plumbed to forktest_background_review_summary.py,test_run_progress_topics.py)