Skip to content

fix: shut down Honcho memory provider after oneshot#31664

Open
benpret wants to merge 1 commit into
NousResearch:mainfrom
benpret:fix/oneshot-honcho-shutdown
Open

fix: shut down Honcho memory provider after oneshot#31664
benpret wants to merge 1 commit into
NousResearch:mainfrom
benpret:fix/oneshot-honcho-shutdown

Conversation

@benpret

@benpret benpret commented May 24, 2026

Copy link
Copy Markdown

Summary

  • shut down the configured memory provider when hermes chat -q / oneshot exits
  • route Honcho provider shutdown through HonchoSessionManager.shutdown() instead of only flushing
  • track and join Honcho context-prefetch threads during shutdown
  • preserve the old shutdown contract by flushing pending session writes for all write-frequency modes

Test plan

  • python -m pytest tests/hermes_cli/test_tui_resume_flow.py::test_oneshot_shuts_down_memory_provider tests/honcho_plugin/test_async_memory.py::TestAsyncWriterThread::test_shutdown_flushes_session_mode tests/honcho_plugin/test_async_memory.py::TestAsyncWriterThread::test_shutdown_joins_prefetch_threads -q -o 'addopts='
  • python -m pytest tests/hermes_cli/test_tui_resume_flow.py tests/honcho_plugin/test_async_memory.py tests/honcho_plugin/test_session.py -q -o 'addopts='
  • git diff --check

Ensure oneshot runs memory-provider shutdown in a finally block so background Honcho work is drained before process exit. Route Honcho provider shutdown through the session manager, flush pending sessions for all write-frequency modes, and join tracked context-prefetch threads.

Tests cover oneshot provider shutdown, session-mode flush on shutdown, and prefetch-thread joining.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins comp/cli CLI entry point, hermes_cli/, setup wizard tool/memory Memory tool and memory providers labels May 24, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #31172 — same fix: tear down Honcho memory provider threads on oneshot exit. #31172 is already triaged and supersedes closed #11680. Also related to #27842 (mem0 variant of the same issue).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have tool/memory Memory tool and memory providers type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants