fix(desktop): keep composer usable during reconnect (#45488)
* feat(cli): add --safe-mode troubleshooting flag Inspired by Claude Code v2.1.169 (June 2026): run Hermes with all customizations disabled to isolate setup problems from product bugs. --safe-mode implies --ignore-user-config and --ignore-rules, and additionally skips plugin discovery (hermes_cli/plugins.py) and MCP server loading (tools/mcp_tool.py) via the internal HERMES_SAFE_MODE env bridge. * fix(desktop): keep composer usable during reconnect
This commit is contained in:
@@ -1124,6 +1124,14 @@ class PluginManager:
|
||||
"""
|
||||
if self._discovered and not force:
|
||||
return
|
||||
# Safe mode (--safe-mode / HERMES_SAFE_MODE=1): troubleshooting run
|
||||
# with all customizations disabled. Skip plugin discovery entirely so
|
||||
# no third-party code (hooks, tools, platforms) loads. Mark as
|
||||
# discovered so callers see a clean empty registry, not a retry loop.
|
||||
if env_var_enabled("HERMES_SAFE_MODE"):
|
||||
logger.info("HERMES_SAFE_MODE=1 — plugin discovery skipped")
|
||||
self._discovered = True
|
||||
return
|
||||
if force:
|
||||
self._plugins.clear()
|
||||
self._hooks.clear()
|
||||
|
||||
Reference in New Issue
Block a user