hermes-agent/tools
Teknium 7619564fbd fix(gateway): gate background-process completions on spawning-session boundary
Plain type=completion events built in _run_process_watcher carried only
session_key (chat/thread routing) with no spawning-session stamp, so after
/new (or a session switch) a completion notification from the OLD session
was injected into the chat's NEW session. Main already solved this exact
class for async delegations via the _classify_completion_target pre-flight
(_USER_BOUNDARY_END_REASONS drop on user-closed sessions, deliver on
idle-ends, follow the compression-tip chain), but the gate only ran for
type=async_delegation events.

Kernel salvage of #16455:

- Stamp the spawning conversation's session-db id (HERMES_SESSION_ID via
  session-scoped env) on the ProcessSession and the pending_watchers entry
  at spawn time in tools/terminal_tool.py; persist it through the process
  registry checkpoint/restore so recovered watchers keep the stamp.
- Thread the stamp into the completion_evt built by _run_process_watcher
  (watcher entry first, ProcessSession fallback for recovered watchers).
- In _deliver_completion_notification, run the SAME pre-flight classifier
  for stamped type=completion events: terminal -> drop with a log (output
  stays available via process(action='log')), retry -> False so the
  watcher re-polls, deliver -> proceed. The policy has exactly one owner
  (_classify_completion_target); nothing is forked. Unstamped legacy
  events keep today's deliver-always behavior, and the async-delegation
  path is untouched.

Based on the session-boundary approach from #16455 by @Tosko4 (original PR
was over-scoped across adapters/slash-commands/cron; this lands the kernel
only).

Tests: completion from a /new-closed session is dropped; completion after
an idle-end still delivers; unstamped legacy event delivers; retry verdict
returns retryable False without adapter injection; async_delegation gate
unchanged; stamp survives checkpoint recovery.
2026-08-14 01:09:42 -07:00
..
computer_use feat(computer_use): spill full element tree to a cache file and report numeric bounds_scale (#85047) 2026-08-12 21:53:11 -07:00
environments fix(tools): do not adopt a stale cwd after an interrupted command 2026-08-13 20:30:26 -07:00
neutts_samples
…
wakewords feat(voice): bundle the trained "hey hermes" model as the out-of-the-box default 2026-07-28 07:58:16 -07:00
__init__.py
…
ansi_strip.py
…
approval.py fix(observability): forward Hermes session id on approval hooks 2026-08-12 19:20:03 -07:00
async_delegation.py fix(gateway,relay): stop frozen-preview finals and dropped idle-session delegation callbacks (#82592) 2026-08-11 09:56:13 +10:00
audio_container.py refactor: extract shared audio container sniffer to tools/audio_container.py 2026-07-28 11:52:44 -07:00
binary_extensions.py
…
blueprints.py fix(cron): surface initial scheduler registration failures 2026-08-07 17:45:06 +05:30
browser_camofox.py fix(browser): scope Camofox session identity 2026-08-02 00:11:50 -07:00
browser_camofox_state.py
…
browser_cdp_tool.py fix(browser): stop stale cdp_url from stalling every startup by 10+ seconds 2026-07-27 14:32:05 -07:00
browser_dialog_tool.py
…
browser_supervisor.py perf(imports): lazy-load heavy SDKs off the cold-start waterfall 2026-07-29 10:54:04 -07:00
browser_tool.py fix(browser): harden npx agent-browser resolution 2026-08-13 02:38:28 -07:00
browser_use_cli.py Disable Browser Use telemetry by default 2026-08-12 16:10:25 -07:00
budget_config.py
…
checkpoint_manager.py refactor: single build_subprocess_env() factory for all child-process spawns (profile + secret-scrub single owner) 2026-07-29 10:14:11 -07:00
clarify_gateway.py feat(clarify): label the agent's recommended choice on every surface 2026-08-13 01:19:42 -05:00
clarify_tool.py feat(clarify): label the agent's recommended choice on every surface 2026-08-13 01:19:42 -05:00
close_terminal_tool.py fix(agent): the desktop's tools reach it on remote and cloud backends too 2026-08-06 19:35:47 -06:00
code_execution_tool.py refactor(tools): unify probe caches and dedupe the exclusion log 2026-08-12 17:42:34 +05:30
computer_use_tool.py feat(computer_use): align cua-driver 0.10 permission modes 2026-07-29 12:19:37 -07:00
credential_files.py fix(docker): close the cold-container and multi-backend gaps in attachment delivery 2026-08-08 05:44:18 -07:00
cronjob_tools.py fix(cron): relay-fronted Slack delivery — synthetic creation-thread capture + preflight fronted-platform blindness 2026-08-13 10:46:13 -07:00
daemon_pool.py
…
debug_helpers.py
…
delegate_tool.py fix(tools): symlink-safe exclusive creation for all spill/cache writers 2026-08-13 11:09:51 -07:00
delegation_live_log.py fix(delegation): redact credentials in live subagent transcripts 2026-07-20 06:50:31 -07:00
delegation_output_schema.py feat(delegation): optional structured-output schema on delegate_task 2026-08-07 09:07:42 -07:00
desktop_ui.py feat(desktop): agent can focus panes + shared desktop-UI event bridge 2026-07-22 12:13:01 -05:00
discord_tool.py fix(tools): isolate model tools by multiplex profile 2026-08-02 00:11:50 -07:00
env_passthrough.py fix(security): scope passthrough env to routed profile 2026-08-02 00:36:03 -07:00
env_probe.py fix(runtime): resolve Hermes-managed Node and uv before bare PATH 2026-08-01 21:17:51 -04:00
fal_common.py
…
feishu_doc_tool.py
…
feishu_drive_tool.py
…
file_operations.py fix(search): keep grep fallback root searchable 2026-08-13 01:34:00 +05:30
file_state.py
…
file_tools.py fix(tools): do not adopt a stale cwd after an interrupted command 2026-08-13 20:30:26 -07:00
flux3_video_tool.py Portal free user vision fix + flux3 polling improvements (#75448) 2026-07-31 10:17:55 -04:00
focus_pane_tool.py fix(agent): the desktop's tools reach it on remote and cloud backends too 2026-08-06 19:35:47 -06:00
fuzzy_match.py refactor(tools): extract IDENTICAL_STRINGS_ERROR constant 2026-08-12 15:21:47 +05:30
homeassistant_tool.py fix(tools): isolate model tools by multiplex profile 2026-08-02 00:11:50 -07:00
hook_output_spill.py fix(tools): symlink-safe exclusive creation for all spill/cache writers 2026-08-13 11:09:51 -07:00
image_generation_tool.py Add more FAL models to nous portal (#82019) 2026-08-08 19:59:12 -04:00
image_source.py fix(image_gen): confine generation source images to the terminal backend 2026-08-08 04:19:38 -07:00
interrupt.py
…
kanban_tools.py feat(kanban): explicit notify/wake delivery modes with faithful wake session routing 2026-08-13 10:47:40 -07:00
lazy_deps.py fix(ci): sync lazy_deps SDK pins + update WAL vacuum test contract 2026-08-12 20:02:07 -07:00
managed_tool_gateway.py fix(gateway): read auth.json as UTF-8 in _read_nous_provider_state 2026-08-08 12:32:23 -07:00
mcp_dashboard_oauth.py
…
mcp_oauth.py fix(mcp): invalidate OAuth tokens when the configured client changes 2026-08-12 19:44:17 -07:00
mcp_oauth_manager.py fix(mcp): make Figma remote OAuth work via DCR allowlist defaults 2026-07-28 00:53:16 -05:00
mcp_schema_cache.py polish(mcp): simplify-pass folds on the lazy-startup salvage 2026-08-03 14:24:37 +05:30
mcp_stdio_watchdog.py
…
mcp_tool.py fix: Windows MCP PATHEXT resolution + python3 -> python in cross-platform skills (#84429) 2026-08-12 02:43:28 -07:00
memory_tool.py fix: finish the missing-encoding sweep — BOM-tolerant reads for user-edited stores 2026-08-08 12:32:23 -07:00
microsoft_graph_auth.py
…
microsoft_graph_client.py refactor: single shared Retry-After parser 2026-07-29 10:13:50 -07:00
neutts_synth.py fix(voice): reconcile NeuTTS backbone/codec GPU device strings 2026-07-28 14:07:21 -07:00
open_preview_tool.py fix(agent): the desktop's tools reach it on remote and cloud backends too 2026-08-06 19:35:47 -06:00
openrouter_client.py fix(secrets): scope-aware credential reads in core tool/gateway/web-server paths 2026-08-02 10:02:33 -07:00
osv_check.py fix(security): cache OSV malware preflight verdicts and stop double component discovery (#75485) 2026-08-01 10:47:20 -07:00
patch_parser.py fix(tools): skip degenerate identical hunks in V4A validation 2026-08-12 15:21:47 +05:30
path_security.py refactor: migrate hand-rolled error envelopes to shared tool_error() 2026-07-29 10:14:00 -07:00
process_registry.py fix(gateway): gate background-process completions on spawning-session boundary 2026-08-14 01:09:42 -07:00
project_tools.py
…
react_to_message_tool.py fix(agent): the desktop's tools reach it on remote and cloud backends too 2026-08-06 19:35:47 -06:00
read_extract.py feat(read): jq retrieval hint in notebook output truncation marker 2026-08-10 01:28:57 -07:00
read_preview_tool.py fix(agent): the desktop's tools reach it on remote and cloud backends too 2026-08-06 19:35:47 -06:00
read_terminal_tool.py fix(agent): the desktop's tools reach it on remote and cloud backends too 2026-08-06 19:35:47 -06:00
read_window_tool.py fix(desktop): say why read_window_below cannot see the windows 2026-08-08 22:17:38 -05:00
registry.py fix(plugins): isolate ownership by profile 2026-08-12 19:13:32 -07:00
schema_sanitizer.py feat(mcp): collapse const-only anyOf/oneOf unions to property enums 2026-08-07 08:58:25 -07:00
self_repo_guard.py fix(tools): keep non-bash -c invocations covered by the shell guard 2026-08-08 14:56:38 +05:30
send_message_tool.py feat(platforms): add typed plugin send paths 2026-08-12 16:27:19 -07:00
session_search_tool.py perf(session-search): project fields before enrichment 2026-08-03 17:50:58 +05:30
setup_mcp_tool.py feat(desktop): setup_mcp tool — inline MCP consent card over the clarify-style blocking bridge 2026-08-13 01:06:51 -05:00
shell_heredoc.py perf(tools): linear-time masking rebuild + last-opener early exit 2026-08-12 13:57:59 +05:30
skill_linter.py fix: suppress windows-footgun false positives in linter pattern list 2026-08-08 11:12:27 -07:00
skill_manager_tool.py fix(tools): mirror must-differ guidance in skill_manage new_string schema 2026-08-12 15:21:47 +05:30
skill_provenance.py
…
skill_usage.py Merge updated tool metrics into skill metrics 2026-07-31 07:30:30 -07:00
skills_ast_audit.py
…
skills_guard.py fix: Windows agent-loop papercuts — path splitting, hashing, autocomplete, screenshots, OS detection (#84419) 2026-08-12 01:45:18 -07:00
skills_hub.py fix: Windows agent-loop papercuts — path splitting, hashing, autocomplete, screenshots, OS detection (#84419) 2026-08-12 01:45:18 -07:00
skills_sync.py fix(skills): avoid redundant bind-mount scans (#72622) 2026-07-28 04:24:50 -05:00
skills_sync_client.py fix(sync): read org state from the org endpoints, not the personal ones (#75237) 2026-07-30 22:31:42 -07:00
skills_tool.py fix: support packaged memory provider skills 2026-08-13 11:49:14 -07:00
slash_confirm.py
…
spill_safety.py fix(tools): symlink-safe exclusive creation for all spill/cache writers 2026-08-13 11:09:51 -07:00
subagent_worktree.py Inspired by Muse Code: opt-in git worktree isolation for delegated subagents 2026-08-12 19:44:45 -07:00
terminal_hints.py feat(terminal): output-pattern failure hints for common error classes 2026-08-02 15:08:35 -07:00
terminal_tool.py fix(gateway): gate background-process completions on spawning-session boundary 2026-08-14 01:09:42 -07:00
thread_context.py
…
threat_patterns.py
…
tirith_security.py fix(secrets): scope tier-3 credential reads (teams_pipeline, deepinfra models, FAL/XAI/VERCEL/DAYTONA/GITHUB presence, HERMES_API_KEY display) 2026-08-02 10:04:48 -07:00
todo_tool.py fix(compression): preserve synthetic user provenance 2026-07-22 06:56:53 -07:00
tool_backend_helpers.py fix(secrets): scope tier-3 credential reads (teams_pipeline, deepinfra models, FAL/XAI/VERCEL/DAYTONA/GITHUB presence, HERMES_API_KEY display) 2026-08-02 10:04:48 -07:00
tool_output_limits.py
…
tool_result_storage.py
…
tool_search.py refactor(tool-search): drop dead fallback ladder in _available_source_summary 2026-08-03 19:11:30 +05:30
transcription_tools.py feat(plugins): add pre_transcription hook and STT prompt threading 2026-08-12 19:01:30 -07:00
tts_streaming.py fix(tts): route streaming-provider secrets through resolve_provider_secret; bound per-sentence stream bodies at 16 MiB 2026-07-28 22:31:40 -07:00
tts_text_normalize.py fix(tts): unify TTS text preprocessing behind one shared cleaner 2026-07-28 11:55:01 -07:00
tts_tool.py fix(file-safety): approval-gate ~/.ssh/config writes instead of hard-denying (#84663) 2026-08-12 11:04:45 -07:00
url_safety.py fix: scope private URL policy per profile 2026-07-28 14:17:45 -07:00
video_generation_tool.py Add more FAL models to nous portal (#82019) 2026-08-08 19:59:12 -04:00
vision_tools.py perf(cli): sub-400ms warm startup — probe-mode check_fns, lazy MCP SDK, banner snapshot, parallel worktree add 2026-08-10 10:40:19 -07:00
voice_mode.py feat(plugins): add pre_transcription hook and STT prompt threading 2026-08-12 19:01:30 -07:00
wake_word.py fix(wake-word): capture at native input rate 2026-08-08 13:49:24 +05:30
web_tools.py fix(tools): symlink-safe exclusive creation for all spill/cache writers 2026-08-13 11:09:51 -07:00
website_policy.py
…
working_diff.py fix(tools): decode git output as UTF-8 in working_diff on Windows 2026-08-08 12:34:46 -07:00
write_approval.py
…
x_search_tool.py docs(xai): clarify x_search vs xurl routing without schema cross-refs 2026-07-23 21:06:47 -07:00
xai_http.py fix(auth): cover remaining auth.json readers across modules 2026-08-08 12:32:23 -07:00
xai_video_tools.py
…
yuanbao_tools.py
…