Skip to content

fix: add missing get_registry() function for CLI /stop command - #2458

Closed
haiyuzhong1980 wants to merge 1 commit into
NousResearch:mainfrom
haiyuzhong1980:fix/add-get-registry-function
Closed

haiyuzhong1980 wants to merge 1 commit into
NousResearch:mainfrom
haiyuzhong1980:fix/add-get-registry-function

Conversation

@haiyuzhong1980

Copy link
Copy Markdown

Problem

The CLI imports get_registry from tools.process_registry but the function was never defined:

Error: cannot import name 'get_registry' from 'tools.process_registry'

This causes the /stop command to fail.

Solution

Added the missing get_registry() function that returns the module-level process_registry singleton.

Testing

  • Syntax check passed: python -m py_compile tools/process_registry.py
  • Function returns the correct singleton instance

Files Changed

  • tools/process_registry.py: Added get_registry() function (9 lines)

The cli.py imports get_registry from tools.process_registry but the
function was never defined, causing ImportError when running /stop:

  Error: cannot import name 'get_registry' from 'tools.process_registry'

This commit adds the missing get_registry() function that returns the
module-level process_registry singleton.
teknium1 added a commit that referenced this pull request Mar 22, 2026
Two fixes:

1. CLI /stop command crashed with 'cannot import name get_registry' —
   the code imported a non-existent function. Fixed to use the actual
   process_registry singleton and list_sessions() method.
   (Reported in #2458 by haiyuzhong1980)

2. Streaming media delivery used undefined 'adapter' variable —
   our PR #2382 called _deliver_media_from_response(adapter=adapter)
   but 'adapter' wasn't guaranteed to be defined in that scope.
   Fixed to resolve via self.adapters.get(source.platform).
   (Reported in #2424 by 42-evey)
@teknium1

Copy link
Copy Markdown
Collaborator

Fixed in PR #2463 — used the actual process_registry singleton instead of the non-existent get_registry(). Thanks for reporting!

@teknium1 teknium1 closed this Mar 22, 2026
outsourc-e pushed a commit to outsourc-e/hermes-agent that referenced this pull request Mar 26, 2026
Two fixes:

1. CLI /stop command crashed with 'cannot import name get_registry' —
   the code imported a non-existent function. Fixed to use the actual
   process_registry singleton and list_sessions() method.
   (Reported in NousResearch#2458 by haiyuzhong1980)

2. Streaming media delivery used undefined 'adapter' variable —
   our PR NousResearch#2382 called _deliver_media_from_response(adapter=adapter)
   but 'adapter' wasn't guaranteed to be defined in that scope.
   Fixed to resolve via self.adapters.get(source.platform).
   (Reported in NousResearch#2424 by 42-evey)
angelburgosrosado pushed a commit to angelburgosrosado/hermes-agent that referenced this pull request Apr 27, 2026
Two fixes:

1. CLI /stop command crashed with 'cannot import name get_registry' —
   the code imported a non-existent function. Fixed to use the actual
   process_registry singleton and list_sessions() method.
   (Reported in NousResearch#2458 by haiyuzhong1980)

2. Streaming media delivery used undefined 'adapter' variable —
   our PR NousResearch#2382 called _deliver_media_from_response(adapter=adapter)
   but 'adapter' wasn't guaranteed to be defined in that scope.
   Fixed to resolve via self.adapters.get(source.platform).
   (Reported in NousResearch#2424 by 42-evey)
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
Two fixes:

1. CLI /stop command crashed with 'cannot import name get_registry' —
   the code imported a non-existent function. Fixed to use the actual
   process_registry singleton and list_sessions() method.
   (Reported in NousResearch#2458 by haiyuzhong1980)

2. Streaming media delivery used undefined 'adapter' variable —
   our PR NousResearch#2382 called _deliver_media_from_response(adapter=adapter)
   but 'adapter' wasn't guaranteed to be defined in that scope.
   Fixed to resolve via self.adapters.get(source.platform).
   (Reported in NousResearch#2424 by 42-evey)
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
Two fixes:

1. CLI /stop command crashed with 'cannot import name get_registry' —
   the code imported a non-existent function. Fixed to use the actual
   process_registry singleton and list_sessions() method.
   (Reported in NousResearch#2458 by haiyuzhong1980)

2. Streaming media delivery used undefined 'adapter' variable —
   our PR NousResearch#2382 called _deliver_media_from_response(adapter=adapter)
   but 'adapter' wasn't guaranteed to be defined in that scope.
   Fixed to resolve via self.adapters.get(source.platform).
   (Reported in NousResearch#2424 by 42-evey)
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
Two fixes:

1. CLI /stop command crashed with 'cannot import name get_registry' —
   the code imported a non-existent function. Fixed to use the actual
   process_registry singleton and list_sessions() method.
   (Reported in NousResearch#2458 by haiyuzhong1980)

2. Streaming media delivery used undefined 'adapter' variable —
   our PR NousResearch#2382 called _deliver_media_from_response(adapter=adapter)
   but 'adapter' wasn't guaranteed to be defined in that scope.
   Fixed to resolve via self.adapters.get(source.platform).
   (Reported in NousResearch#2424 by 42-evey)
melon-xf added a commit to melon-xf/hermes-agent that referenced this pull request Sep 3, 2026
Two fixes:

1. CLI /stop command crashed with 'cannot import name get_registry' —
   the code imported a non-existent function. Fixed to use the actual
   process_registry singleton and list_sessions() method.
   (Reported in NousResearch#2458 by haiyuzhong1980)

2. Streaming media delivery used undefined 'adapter' variable —
   our PR NousResearch#2382 called _deliver_media_from_response(adapter=adapter)
   but 'adapter' wasn't guaranteed to be defined in that scope.
   Fixed to resolve via self.adapters.get(source.platform).
   (Reported in NousResearch#2424 by 42-evey)
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.

2 participants