Skip to content

fix: replace stale 'hermes login' with 'hermes auth' + fix credential removal re-seeding#5670

Merged
teknium1 merged 1 commit intomainfrom
hermes/hermes-35bfb4c2
Apr 7, 2026
Merged

fix: replace stale 'hermes login' with 'hermes auth' + fix credential removal re-seeding#5670
teknium1 merged 1 commit intomainfrom
hermes/hermes-35bfb4c2

Conversation

@teknium1
Copy link
Copy Markdown
Contributor

@teknium1 teknium1 commented Apr 7, 2026

Summary

Two fixes:

1. Stale hermes login references → hermes auth

hermes login was deprecated but 17+ references across the codebase still pointed users to it. Updated across:

  • hermes_cli/auth.py — Codex credential error messages, migration hints, refresh conflict messages
  • agent/auxiliary_client.py — Nous Portal warnings
  • tools/delegate_tool.py — delegation credential errors
  • run_agent.py — Codex 401 recovery hints
  • hermes_cli/config.py — config template comments
  • Documentation (configuration.md, fallback-providers.md, cli-commands.md)

2. Credential removal doesn't stick for singleton-sourced credentials

Bug: hermes auth remove openai-codex 1 says "Removed" but the credential reappears on next hermes auth invocation.

Root cause: auth_remove_command removes the entry from the credential pool file but the underlying auth store (auth.json providers.openai-codex) still has the OAuth tokens. On next load_pool(), _seed_from_singletons() finds those tokens and re-adds the entry.

Fix: Added parallel clearing logic for singleton sources (matching the existing env-var clearing pattern):

  • device_code on openai-codex/nous → clears auth store provider entry
  • hermes_pkce on anthropic → deletes ~/.hermes/.anthropic_oauth.json
  • claude_code on anthropic → warns user (we don't own Claude Code's credential file)

Test plan

  • E2E verified: load_pool seeds entry → remove_index → load_pool re-seeds (bug confirmed) → clear auth store → load_pool returns empty (fix confirmed)
  • Existing test suite: 67 passed (test_auth_commands, test_credential_pool, test_credential_pool_routing, test_auth_codex_provider, test_auth_nous_provider)

…ntial removal re-seeding

Two fixes:

1. Replace all stale 'hermes login' references with 'hermes auth' across
   auth.py, auxiliary_client.py, delegate_tool.py, config.py, run_agent.py,
   and documentation. The 'hermes login' command was deprecated; 'hermes auth'
   now handles OAuth credential management.

2. Fix credential removal not persisting for singleton-sourced credentials
   (device_code for openai-codex/nous, hermes_pkce for anthropic).
   auth_remove_command already cleared env vars for env-sourced credentials,
   but singleton credentials stored in the auth store were re-seeded by
   _seed_from_singletons() on the next load_pool() call. Now clears the
   underlying auth store entry when removing singleton-sourced credentials.
@teknium1 teknium1 merged commit 8cf013e into main Apr 7, 2026
5 of 7 checks passed
DiscoStew6082 pushed a commit to DiscoStew6082/hermes-agent that referenced this pull request Apr 9, 2026
…ntial removal re-seeding (NousResearch#5670)

Two fixes:

1. Replace all stale 'hermes login' references with 'hermes auth' across
   auth.py, auxiliary_client.py, delegate_tool.py, config.py, run_agent.py,
   and documentation. The 'hermes login' command was deprecated; 'hermes auth'
   now handles OAuth credential management.

2. Fix credential removal not persisting for singleton-sourced credentials
   (device_code for openai-codex/nous, hermes_pkce for anthropic).
   auth_remove_command already cleared env vars for env-sourced credentials,
   but singleton credentials stored in the auth store were re-seeded by
   _seed_from_singletons() on the next load_pool() call. Now clears the
   underlying auth store entry when removing singleton-sourced credentials.
dbmizrahi pushed a commit to dbmizrahi/hermes-agent that referenced this pull request Apr 10, 2026
…ntial removal re-seeding (NousResearch#5670)

Two fixes:

1. Replace all stale 'hermes login' references with 'hermes auth' across
   auth.py, auxiliary_client.py, delegate_tool.py, config.py, run_agent.py,
   and documentation. The 'hermes login' command was deprecated; 'hermes auth'
   now handles OAuth credential management.

2. Fix credential removal not persisting for singleton-sourced credentials
   (device_code for openai-codex/nous, hermes_pkce for anthropic).
   auth_remove_command already cleared env vars for env-sourced credentials,
   but singleton credentials stored in the auth store were re-seeded by
   _seed_from_singletons() on the next load_pool() call. Now clears the
   underlying auth store entry when removing singleton-sourced credentials.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant