mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-02 02:01:47 +00:00
* fix: use session_key instead of chat_id for adapter interrupt lookups monitor_for_interrupt() in _run_agent was using source.chat_id to query the adapter's has_pending_interrupt() and get_pending_message() methods. But the adapter stores interrupt events under build_session_key(source), which produces a different string (e.g. 'agent:main:telegram:dm' vs '123456'). This key mismatch meant the interrupt was never detected through the adapter path, which is the only active interrupt path for all adapter-based platforms (Telegram, Discord, Slack, etc.). The gateway-level interrupt path (in dispatch_message) is unreachable because the adapter intercepts the 2nd message in handle_message() before it reaches dispatch_message(). Result: sending a new message while subagents were running had no effect — the interrupt was silently lost. Fix: replace all source.chat_id references in the interrupt-related code within _run_agent() with the session_key parameter, which matches the adapter's storage keys. Also adds regression tests verifying session_key vs chat_id consistency. * debug: add file-based logging to CLI interrupt path Temporary instrumentation to diagnose why message-based interrupts don't seem to work during subagent execution. Logs to ~/.hermes/interrupt_debug.log (immune to redirect_stdout). Two log points: 1. When Enter handler puts message into _interrupt_queue 2. When chat() reads it and calls agent.interrupt() This will reveal whether the message reaches the queue and whether the interrupt is actually fired. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_async_memory_flush.py | ||
| test_background_command.py | ||
| test_background_process_notifications.py | ||
| test_base_topic_sessions.py | ||
| test_channel_directory.py | ||
| test_config.py | ||
| test_delivery.py | ||
| test_discord_bot_filter.py | ||
| test_discord_free_response.py | ||
| test_document_cache.py | ||
| test_email.py | ||
| test_homeassistant.py | ||
| test_hooks.py | ||
| test_interrupt_key_match.py | ||
| test_media_extraction.py | ||
| test_mirror.py | ||
| test_pairing.py | ||
| test_platform_base.py | ||
| test_resume_command.py | ||
| test_retry_response.py | ||
| test_run_progress_topics.py | ||
| test_send_image_file.py | ||
| test_session.py | ||
| test_session_hygiene.py | ||
| test_signal.py | ||
| test_slack.py | ||
| test_sticker_cache.py | ||
| test_telegram_documents.py | ||
| test_telegram_format.py | ||
| test_title_command.py | ||
| test_transcript_offset.py | ||
| test_update_command.py | ||
| test_whatsapp_connect.py | ||