hermes-agent/tools
Teknium 731aa0ccc9 fix(browser): stop stale cdp_url from stalling every startup by 10+ seconds
Tool-schema assembly at CLI/Desktop startup runs the browser-family
check_fns (browser, browser_cdp, browser_dialog, browser_vision). Each
of those gates called _get_cdp_override(), which resolves the configured
endpoint over HTTP (GET /json/version, timeout=10) — so a *stale*
browser.cdp_url pointing at a dead debug browser cost ~7 serial blocking
socket connects before the banner rendered. Measured on a real Windows
install with a dead http://[::1]:9222 config: 15.1s of an 18s launch,
with no warning or error — just mystery slowness. The value is easy to
leave behind: /browser connect writes a session-scoped env override, but
'hermes config set browser.cdp_url' persists forever while the debug
Chrome it pointed at dies on the next browser restart.

Split the helper:

- _get_cdp_override_raw() — returns the configured value (env var or
  config.yaml) with zero network I/O. Used by every is-it-configured
  gate: check_browser_requirements, _browser_cdp_check, _is_local_mode,
  _is_local_backend, _navigation_session_key, _should_inject_engine
  (via _is_local_mode), and the hermes doctor chromium-skip check.
- _get_cdp_override() — unchanged contract (raw + /json/version
  resolution), now only called on paths that are about to connect:
  session creation and the dialog-supervisor attach.

This follows the existing rule in check_browser_requirements ('do not
execute agent-browser --version here') and the browser.manage status
path, which already banned _get_cdp_override for exactly this reason
(test_browser_manage_status_does_not_call_get_cdp_override): schema
assembly must not perform blocking I/O.

A/B on the same machine, same dead endpoint: get_tool_definitions()
15.08s unpatched -> 1.89s patched, with browser_cdp/browser_dialog
still advertised (gate now keys off configuration, not reachability —
matching the documented lazy-supervisor contract in
_browser_dialog_check).

Adds a regression test asserting the browser_cdp check_fn never touches
the network.
2026-07-27 14:32:05 -07:00
..
computer_use fix(update): never blind-reinstall cua-driver during hermes update 2026-07-26 13:47:35 -07:00
environments fix(environments): exclude multiline session env from terminal snapshots 2026-07-26 19:30:02 -07:00
neutts_samples
__init__.py
ansi_strip.py
approval.py fix(approval): detect recursive rm when flags follow operands 2026-07-26 20:58:52 -07:00
async_delegation.py feat(delegation): structured stall metadata + live per-child status in /agents 2026-07-26 17:13:52 -07:00
binary_extensions.py
blueprints.py
browser_camofox.py
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
browser_tool.py fix(browser): stop stale cdp_url from stalling every startup by 10+ seconds 2026-07-27 14:32:05 -07:00
budget_config.py
checkpoint_manager.py feat(diff): cross-surface /diff with staged/all/session modes 2026-07-26 18:28:20 -07:00
clarify_gateway.py feat(clarify): extend multi-select to gateway text fallback and TUI bridge 2026-07-26 17:46:55 -07:00
clarify_tool.py fix(clarify): route multi_select through current dispatch paths and harden callback detection 2026-07-26 17:46:55 -07:00
close_terminal_tool.py
code_execution_tool.py
computer_use_tool.py
credential_files.py
cronjob_tools.py fix(cron): reconcile external provider after a claimed direct run (#70479) 2026-07-24 13:37:04 +10:00
daemon_pool.py
debug_helpers.py
delegate_tool.py nous portal anthropic wire 2026-07-27 11:53:48 -04:00
delegation_live_log.py
desktop_ui.py
discord_tool.py
env_passthrough.py
env_probe.py fix(windows): re-fit env_probe console suppression to the temp-file _run + add no-window tests (#67690 follow-up) 2026-07-23 18:20:24 -07:00
fal_common.py
feishu_doc_tool.py
feishu_drive_tool.py
file_operations.py
file_state.py
file_tools.py
focus_pane_tool.py
fuzzy_match.py fix(tools): normalize Unicode space family and minus sign in patch fuzzy matching 2026-07-26 20:58:43 -07:00
homeassistant_tool.py
hook_output_spill.py
image_generation_tool.py
image_source.py
interrupt.py
kanban_tools.py fix: scope kanban auto-subscriptions to active profile 2026-07-26 16:27:52 -07:00
lazy_deps.py fix(update): refresh cve dependency pins 2026-07-26 19:29:07 -07:00
managed_tool_gateway.py fix(windows): sweep remaining bare read_text/write_text sites + linter rule 2026-07-24 17:10:39 -07:00
mcp_dashboard_oauth.py
mcp_oauth.py
mcp_oauth_manager.py
mcp_stdio_watchdog.py
mcp_tool.py feat(mcp): fnmatch glob support in tools.include/exclude filters 2026-07-26 08:26:09 -07:00
memory_tool.py fix(memory): close second-read drift race and treat invalid UTF-8 as unreadable 2026-07-24 15:58:01 -07:00
microsoft_graph_auth.py
microsoft_graph_client.py
neutts_synth.py
open_preview_tool.py
openrouter_client.py
osv_check.py
patch_parser.py
path_security.py
process_registry.py fix(process_registry): reader loop no longer hangs when an orphaned grandchild holds the stdout pipe 2026-07-24 15:59:02 -07:00
project_tools.py
read_extract.py
read_terminal_tool.py
registry.py
schema_sanitizer.py fix(tools): rename provider-illegal property keys in tool schemas, reverse-map at dispatch 2026-07-26 08:26:09 -07:00
send_message_tool.py fix(gateway,tools): add missing .3gp and .webm to video extension sets 2026-07-26 12:52:31 -07:00
session_search_tool.py fix(session-search): allow scrolling compacted lineage history 2026-07-26 16:18:31 -07:00
skill_manager_tool.py fix(skills): fail closed on unknown curator ownership 2026-07-25 20:15:37 -07:00
skill_provenance.py
skill_usage.py fix(curator): make the autonomous write policy consistent (#67140) 2026-07-25 19:27:17 -07:00
skills_ast_audit.py
skills_guard.py
skills_hub.py fix(skills): parse stored GitHub credentials without scanner false positives 2026-07-26 20:59:26 -07:00
skills_sync.py fix(skills): parse stored GitHub credentials without scanner false positives 2026-07-26 20:59:26 -07:00
skills_tool.py fix(skills): scope 60-char description enforcement to the create path 2026-07-24 07:54:21 -07:00
slash_confirm.py
terminal_tool.py
thread_context.py
threat_patterns.py
tirith_security.py fix: add explicit UTF-8 encoding to all subprocess text=True calls (#53428) 2026-07-24 11:45:57 -07:00
todo_tool.py
tool_backend_helpers.py
tool_output_limits.py
tool_result_storage.py
tool_search.py feat(tool_search): probe-validate blind tool_call args against the deferred schema 2026-07-26 20:59:36 -07:00
transcription_tools.py fix(tools): utf-8 decode for STT/TTS command-provider popen_kwargs 2026-07-24 15:47:12 -07:00
tts_streaming.py
tts_tool.py fix(tools): utf-8 decode for STT/TTS command-provider popen_kwargs 2026-07-24 15:47:12 -07:00
url_safety.py fix(url_safety): harden proxy DNS delegation — literal IPs stay fail-closed + regression tests 2026-07-24 10:37:29 -07:00
video_generation_tool.py
vision_tools.py
voice_mode.py fix: add explicit UTF-8 encoding to all subprocess text=True calls (#53428) 2026-07-24 11:45:57 -07:00
web_tools.py fix: add encoding="utf-8" to Path.write_text() calls (P1) 2026-07-24 17:10:39 -07:00
website_policy.py
working_diff.py feat(diff): cross-surface /diff with staged/all/session modes 2026-07-26 18:28:20 -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: add UTF-8 encoding to read_text/write_text in tools/ and agent/ 2026-07-24 17:10:39 -07:00
xai_video_tools.py
yuanbao_tools.py