hermes - ✅(Solved) Fix bug: opencode-go env-seeded credentials are pruned on load [1 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#12636Fetched 2026-04-20 12:17:49
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Root Cause

Summary\nWhen opencode-go credentials are initially seeded from OPENCODE_GO_API_KEY and later the env var is absent, the stored credential entry gets pruned during load. That leaves runtime resolution with an empty api_key and breaks provider selection.\n\n## Impact\n- opencode-go resolves with api_key = "" at runtime\n- users lose the persisted credential after a restart / env change\n- provider appears to "not work" even though auth had previously succeeded\n\n## Root Cause\nThe credential pool loader treats env-seeded opencode-go credentials as disposable and removes them when OPENCODE_GO_API_KEY is not present, instead of preserving already-persisted entries.\n\n## Fix\nA local fix has already been implemented and verified in a branch/PR:\n- PR: https://github.com/NousResearch/hermes-agent/pull/12634\n\n## Verification\nTargeted tests passed after the fix:\n- tests/agent/test_credential_pool.py\n- tests/hermes_cli/test_model_normalize.py\n- tests/hermes_cli/test_model_validation.py\n- tests/hermes_cli/test_model_switch_opencode_anthropic.py\n\n## Environment\n- Repo: hermes-agent\n- Branch: fix/opencode-go-env-credential-persistence\n- Commit: 104c6f43\n

PR fix notes

PR #12634: fix: persist opencode-go env-seeded credentials

Description (problem / solution / changelog)

Summary\n- Preserve opencode-go credentials that were seeded from env so they don't disappear when the env var is absent later.\n- Prevent credential_pool from pruning already-persisted opencode-go entries during load.\n\n## Verification\n- pytest -q tests/agent/test_credential_pool.py tests/hermes_cli/test_model_normalize.py tests/hermes_cli/test_model_validation.py tests/hermes_cli/test_model_switch_opencode_anthropic.py -q\n\n## Notes\nThis fixes the runtime path where opencode-go resolved with an empty api_key because the stored credential entry had been dropped prematurely.

Changed files

  • agent/credential_pool.py (modified, +21/-13)
  • tests/agent/test_credential_pool.py (modified, +80/-4)
RAW_BUFFERClick to expand / collapse

Summary\nWhen opencode-go credentials are initially seeded from OPENCODE_GO_API_KEY and later the env var is absent, the stored credential entry gets pruned during load. That leaves runtime resolution with an empty api_key and breaks provider selection.\n\n## Impact\n- opencode-go resolves with api_key = "" at runtime\n- users lose the persisted credential after a restart / env change\n- provider appears to "not work" even though auth had previously succeeded\n\n## Root Cause\nThe credential pool loader treats env-seeded opencode-go credentials as disposable and removes them when OPENCODE_GO_API_KEY is not present, instead of preserving already-persisted entries.\n\n## Fix\nA local fix has already been implemented and verified in a branch/PR:\n- PR: https://github.com/NousResearch/hermes-agent/pull/12634\n\n## Verification\nTargeted tests passed after the fix:\n- tests/agent/test_credential_pool.py\n- tests/hermes_cli/test_model_normalize.py\n- tests/hermes_cli/test_model_validation.py\n- tests/hermes_cli/test_model_switch_opencode_anthropic.py\n\n## Environment\n- Repo: hermes-agent\n- Branch: fix/opencode-go-env-credential-persistence\n- Commit: 104c6f43\n

extent analysis

TL;DR

Apply the fix from PR https://github.com/NousResearch/hermes-agent/pull/12634 to preserve persisted opencode-go credentials when the OPENCODE_GO_API_KEY environment variable is absent.

Guidance

  • Review the changes in the PR to understand how the credential pool loader is modified to preserve persisted entries.
  • Verify that the targeted tests (e.g., test_credential_pool.py, test_model_normalize.py) pass after applying the fix to ensure the issue is resolved.
  • Check the environment variables and configuration to ensure that the OPENCODE_GO_API_KEY is properly set or removed as needed.
  • Consider backporting the fix to other relevant branches or releases to prevent similar issues.

Example

No code snippet is provided as the fix is already implemented in the mentioned PR.

Notes

The fix is specific to the hermes-agent repository and may not apply to other projects or environments. The PR provides the necessary changes to resolve the issue.

Recommendation

Apply the workaround by merging the PR https://github.com/NousResearch/hermes-agent/pull/12634, as it has already been verified to fix the issue.

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: opencode-go env-seeded credentials are pruned on load [1 pull requests, 1 participants]