You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Shell hooks (config.yaml hooks:) are never registered in the desktop TUI entry point #43823
hooks: entries in config.yaml (shell hooks) are silently ignored when running the desktop app / TUI (tui_gateway). The same config works in CLI and gateway sessions.
Restart the desktop app, start a chat, have the agent run a terminal command matching the hook (e.g. git commit --allow-empty -m test).
The command executes; the hook never fires. Logs contain no "shell hook registered" or "not allowlisted - skipped" lines.
Cause (from reading the source)
agent.shell_hooks.register_from_config() is called at CLI startup (cli.py, hermes_cli/main.py) and gateway startup (gateway/run.py), but never from tui_gateway/ - so desktop sessions have no shell hooks at all, even though pre_tool_call plugin hooks dispatched via hermes_cli.plugins.invoke_hook work fine there.
Expected
Either register shell hooks in the TUI gateway startup as well, or document that shell hooks are CLI/gateway-only. Since hooks are a security surface (the docs advertise pre_tool_call blocking), the silent no-op is the risky part: a user can configure a blocking hook, see no error, and believe they are protected.
Workaround
A user plugin (HERMES_HOME/plugins/<name>/ registering pre_tool_call via register(ctx)) + plugins.enabled: [<name>] works in the desktop TUI.
Found while wiring policy gates for autonomous runs; happy to provide more logs/details.
changed the title [-]Shell hooks (config.yaml hooks:) are never registered in the desktop TUI entry point[/-][+][Bug]: Shell hooks (config.yaml hooks:) are never registered in the desktop TUI entry point[/+]on Jun 10, 2026
Duplicate of #41457 — same gap: shell_hooks.register_from_config() is not called in the desktop/TUI entry point, so pre_tool_call block hooks silently no-op there. Fix PRs: #43826/#43828 (and existing #13854/#34112/#41464).
This is fixed by #43826 — adds register_from_config() call to tui_gateway/entry.py::main() so shell hooks (config.yaml hooks: entries) are registered at desktop/TUI startup.
The missing in-process shell-hook registration is resolved on main in #104870 (#104870), merge commit d87d7657c0791c7038f2e5dfffb036516cba512c. The shared chat-agent factory now invokes the existing consent-aware, profile-keyed registrar in the process that executes the turn—not just the launcher.
The merged live serve/WebSocket/local-model/subprocess A/B verified file and terminal hooks across launch/A/B/A profiles: formerly unblocked writes are blocked, with exactly one matching hook per turn; unapproved controls retain ordinary tool execution. This is real Linux backend evidence, not native Windows/macOS or Feishu/vendor service QA. Existing hook event semantics are unchanged.
Please update to a build containing this commit and restart the serving process. Reply with a fresh reproduction if registration remains missing so we can reopen.
Activity
[-]Shell hooks (config.yaml hooks:) are never registered in the desktop TUI entry point[/-][+][Bug]: Shell hooks (config.yaml hooks:) are never registered in the desktop TUI entry point[/+]alt-glitch commentedon Jun 10, 2026
Duplicate of #41457 — same gap:
shell_hooks.register_from_config()is not called in the desktop/TUI entry point, sopre_tool_callblock hooks silently no-op there. Fix PRs: #43826/#43828 (and existing #13854/#34112/#41464).liuhao1024 commentedon Jun 11, 2026
This is fixed by #43826 — adds
register_from_config()call totui_gateway/entry.py::main()so shell hooks (config.yamlhooks:entries) are registered at desktop/TUI startup.teknium1 commentedon Sep 7, 2026
The missing in-process shell-hook registration is resolved on main in #104870 (#104870), merge commit
d87d7657c0791c7038f2e5dfffb036516cba512c. The shared chat-agent factory now invokes the existing consent-aware, profile-keyed registrar in the process that executes the turn—not just the launcher.The merged live serve/WebSocket/local-model/subprocess A/B verified file and terminal hooks across launch/A/B/A profiles: formerly unblocked writes are blocked, with exactly one matching hook per turn; unapproved controls retain ordinary tool execution. This is real Linux backend evidence, not native Windows/macOS or Feishu/vendor service QA. Existing hook event semantics are unchanged.
Thanks @pat-videdev for the report and process-path evidence; credit @grimmjoww (#57020), @michaelversluis (#69832), @fangliquanflq (#102691), and @foma-agent for the earlier implementation and profile-isolation investigations. The distinct startup-refusal contract in #69825 and ACP portion of #41457 remain open.
Please update to a build containing this commit and restart the serving process. Reply with a fresh reproduction if registration remains missing so we can reopen.