fix(honcho): sync_turn crashes on list input from image-bearing messages#22768
Open
ikelvingo wants to merge 1 commit into
Open
fix(honcho): sync_turn crashes on list input from image-bearing messages#22768ikelvingo wants to merge 1 commit into
ikelvingo wants to merge 1 commit into
Conversation
19 tasks
This was referenced May 22, 2026
ikelvingo
added a commit
to ikelvingo/hermes-agent
that referenced
this pull request
May 31, 2026
…stent session Port of NousResearch#18251: - model_tools.py: add _get_worker_session() with thread-local persistent aiohttp.ClientSession bound to each worker thread's event loop - gateway/platforms/weixin.py: remove _LIVE_ADAPTERS lazy-reuse block in send_weixin_direct(), use _get_worker_session() instead fix(honcho): sync_turn handles multimodal (list) content from image-bearing messages Port of NousResearch#22768: - plugins/memory/honcho/__init__.py: expand type annotation to str | list for user_content and assistant_content; add _extract_text() helper to extract text parts from multimodal lists before sanitize_context() - image references are excluded from memory (memory providers should not store image URIs)
ikelvingo
added a commit
to ikelvingo/hermes-agent
that referenced
this pull request
Jun 4, 2026
Port of upstream f24b7ed (fix: make Honcho startup fail open): - plugins/memory/honcho/__init__.py: refactor startup to background thread via _start_session_init_background(), add _session_ready() guard, and new _init_thread/_init_lock/_init_error fields for fail-open behavior - tests/test_honcho_startup_fail_open.py: add 357-line test suite Port of NousResearch#22768 (fix(honcho): sync_urn crashes on list input from image-bearing messages): - plugins/memory/honcho/__init__.py: expand sync_urn type annotation to str | list for user_content and assistant_content; add _extract_text() helper to extract text parts from multimodal lists; image references are excluded from memory (memory providers should not store image URIs)
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.
What does this PR do?
Fix
TypeError: expected string or bytes-like object, got 'list'in the Honcho memory plugin when processing messages that carry multimodal content (e.g. WeChat images, custom emoji, platform-native sticker packs).Related Issue
Fixes #
Type of Change
Changes Made
plugins/memory/honcho/__init__.py—sync_turn:str | listfor bothuser_contentandassistant_content_extract_text()helper that extractstype=="text"parts from multimodal lists and discardsimage_url/ other non-text partssanitize_context, normalize content through_extract_text()How to Test
TypeErrorin honcho dialectic logsync_turnbehavior is unchanged (backward compatible)pytest tests/ -qif test suite exists for honcho pluginChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
Before fix:
TypeError: expected string or bytes-like object, got 'list'in honcho dialectic log when processing image-bearing messages.After fix: Message is processed normally; only text content is written to Honcho; image references are discarded.