fix(toolsets): keep the coding posture toolset out of per-platform recovery

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.
This commit is contained in:
Brooklyn Nicholson 2026-06-10 02:14:52 -05:00
parent 2667bb83f2
commit 83f792ed9d
2 changed files with 9 additions and 1 deletions

View file

@ -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

View file

@ -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,
},
# ==========================================================================