fix(setup): exclude posture toolsets from blank-slate disabled_toolsets

Blank Slate's _blank_slate_minimal_toolsets() adds every TOOLSETS entry
to agent.disabled_toolsets except file and terminal.  The coding
posture toolset (session-level, selected by agent/coding_context.py)
slips through because the loop only skips hermes-* composites and
includes-only groups.

At runtime, model_tools.get_tool_definitions() resolves coding and
subtracts its tools — terminal, read_file, write_file, patch,
search_files, process — erasing the entire Blank Slate minimal surface.
The agent ends up with only cronjob.

Skip posture toolsets in the disabled-list computation.  Posture
toolsets are not user-facing capabilities to disable; they are
per-session selections that should never appear in agent.disabled_toolsets.

Fixes #57315
This commit is contained in:
liuhao1024 2026-07-03 04:21:22 +08:00 committed by Teknium
parent c9adbaff5e
commit b57fe5ca01
2 changed files with 41 additions and 0 deletions

View file

@ -3054,6 +3054,12 @@ def _blank_slate_minimal_toolsets(config: dict):
continue # platform composites — not user-facing toolsets
if isinstance(tdef, dict) and tdef.get("includes"):
continue # composite groupings, not leaf toolsets
if isinstance(tdef, dict) and tdef.get("posture"):
continue # posture toolsets (e.g. coding) are session-level
# selections made by agent/coding_context.py — not permanent
# user-facing disables. Adding them here causes model_tools
# to subtract their tools (terminal, read_file, …) from the
# minimal Blank Slate surface (#57315).
all_keys.add(k)
disabled = sorted(all_keys - keep)