From 83f792ed9dca32dde571dc892c574e1d7e766b38 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Wed, 10 Jun 2026 02:14:52 -0500 Subject: [PATCH] fix(toolsets): keep the coding posture toolset out of per-platform recovery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The non-configurable-toolset recovery loop in _get_platform_tools() was auto-adding "coding" to every platform's resolved toolsets (its tools fit the platform universe but aren't fully covered by configurable toolsets — same shape as kanban). The coding toolset is a session-level posture selected by agent/coding_context.py, not a per-platform capability, so mark it posture: True in TOOLSETS and skip posture toolsets in recovery. Fixes CI shard 6: test_load_enabled_toolsets_rejects_disabled_mcp_env, test_load_enabled_toolsets_falls_back_when_tui_env_invalid. --- hermes_cli/tools_config.py | 4 ++++ toolsets.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hermes_cli/tools_config.py b/hermes_cli/tools_config.py index ae97dbf54a2..f76c56e667f 100644 --- a/hermes_cli/tools_config.py +++ b/hermes_cli/tools_config.py @@ -1437,6 +1437,10 @@ def _get_platform_tools( continue if ts_def.get("includes"): continue + # Posture toolsets (e.g. ``coding``) are session-level selections made + # by agent/coding_context.py — not per-platform capabilities to recover. + if ts_def.get("posture"): + continue ts_tools = set(resolve_toolset(ts_key)) if not ts_tools or not ts_tools.issubset(platform_tool_universe): continue diff --git a/toolsets.py b/toolsets.py index 41c035b23f2..5c67bfb2114 100644 --- a/toolsets.py +++ b/toolsets.py @@ -360,7 +360,11 @@ TOOLSETS = { "session_search", "clarify", "execute_code", "delegate_task", ], - "includes": [] + "includes": [], + # Posture toolset: selected per-session by agent/coding_context.py, + # never auto-recovered into per-platform tool config (see the + # non-configurable-toolset recovery loop in hermes_cli/tools_config.py). + "posture": True, }, # ==========================================================================