Technique 07 / 07
Task-specific tool adaptation
Offer the right editing and exploration surface for this task instead of one universal tool setup.
Interactive model
See the context change.
Switch from a generic catalog to the surface for a repository exploration task.
Read-only localisation surface
- 01
Glob for file patterns
- 02
Grep for exact symbols
- 03
Read relevant ranges
- 04
Traverse CodeGraph
- 05
No editing permission
Conceptual demonstration. Counts illustrate the flow, not measured production savings.
How it works
Less context. Same thread of work.
Every tool schema consumes prompt space and every capability broadens the agent’s choices. DistilCode builds its registry at runtime: optional tools depend on client and feature flags, web search depends on provider support, and compatible GPT models receive apply_patch while other models receive edit and write.
Roles add a second layer of adaptation. Explore and smartbash agents have narrow allow-lists, task descriptions expose only permitted subagent types, and CodeGraph MCP tools are visible only where their permission rules allow them. Not every denied built-in is removed from every model prompt, so the accurate claim is targeted registry and permission adaptation, not universal schema elimination.
In practice
The operating loop
- 01
Match the model
The registry selects apply_patch or edit/write based on the active model family.
- 02
Match the runtime
Search, LSP, planning, phases, and code mode appear only when their provider, client, or flag conditions are met.
- 03
Match the role
Specialist permissions constrain capabilities and filter discoverable subagents and MCP tools.
