hermes-agent/tools
Teknium dfc820345d
fix: scope tool interrupt signal per-thread to prevent cross-session leaks (#7930)
The interrupt mechanism in tools/interrupt.py used a process-global
threading.Event. In the gateway, multiple agents run concurrently in
the same process via run_in_executor. When any agent was interrupted
(user sends a follow-up message), the global flag killed ALL agents'
running tools — terminal commands, browser ops, web requests — across
all sessions.

Changes:
- tools/interrupt.py: Replace single threading.Event with a set of
  interrupted thread IDs. set_interrupt() targets a specific thread;
  is_interrupted() checks the current thread. Includes a backward-
  compatible _ThreadAwareEventProxy for legacy _interrupt_event usage.
- run_agent.py: Store execution thread ID at start of run_conversation().
  interrupt() and clear_interrupt() pass it to set_interrupt() so only
  this agent's thread is affected.
- tools/code_execution_tool.py: Use is_interrupted() instead of
  directly checking _interrupt_event.is_set().
- tools/process_registry.py: Same — use is_interrupted().
- tests: Update interrupt tests for per-thread semantics. Add new
  TestPerThreadInterruptIsolation with two tests verifying cross-thread
  isolation.
2026-04-11 14:02:58 -07:00
..
browser_providers feat: switch managed browser provider from Browserbase to Browser Use (#5750) 2026-04-07 08:40:22 -04:00
environments
neutts_samples
__init__.py
ansi_strip.py
approval.py
binary_extensions.py
browser_camofox.py
browser_camofox_state.py
browser_tool.py fix: reap orphaned browser sessions on startup (#7931) 2026-04-11 14:02:46 -07:00
budget_config.py
checkpoint_manager.py
clarify_tool.py
code_execution_tool.py fix: scope tool interrupt signal per-thread to prevent cross-session leaks (#7930) 2026-04-11 14:02:58 -07:00
credential_files.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
cronjob_tools.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
debug_helpers.py
delegate_tool.py feat(delegation): add configurable reasoning_effort for subagents 2026-04-10 21:16:53 -07:00
env_passthrough.py
file_operations.py fix(tools): remove dead code in _is_likely_binary and harden _check_lint against brace paths 2026-04-10 21:16:53 -07:00
file_tools.py
fuzzy_match.py
homeassistant_tool.py
image_generation_tool.py
interrupt.py fix: scope tool interrupt signal per-thread to prevent cross-session leaks (#7930) 2026-04-11 14:02:58 -07:00
managed_tool_gateway.py
mcp_oauth.py
mcp_tool.py
memory_tool.py
mixture_of_agents_tool.py
neutts_synth.py
openrouter_client.py
osv_check.py
patch_parser.py
path_security.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
process_registry.py fix: scope tool interrupt signal per-thread to prevent cross-session leaks (#7930) 2026-04-11 14:02:58 -07:00
registry.py
rl_training_tool.py
send_message_tool.py
session_search_tool.py
skill_manager_tool.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
skills_guard.py
skills_hub.py
skills_sync.py fix(skills): read name from SKILL.md frontmatter in skills_sync 2026-04-11 01:21:20 -07:00
skills_tool.py refactor: extract shared helpers to deduplicate repeated code patterns (#7917) 2026-04-11 13:59:52 -07:00
terminal_tool.py fix(gateway): propagate user identity through process watcher pipeline 2026-04-11 13:46:16 -07:00
tirith_security.py
todo_tool.py
tool_backend_helpers.py
tool_result_storage.py
transcription_tools.py
tts_tool.py feat(tools): add Voxtral TTS provider (Mistral AI) 2026-04-11 01:56:55 -07:00
url_safety.py
vision_tools.py fix(vision): preserve aspect ratio during auto-resize 2026-04-11 11:53:04 -07:00
voice_mode.py
web_tools.py
website_policy.py