Technique 04 / 07
Dynamic delegation of tasks
Give a focused subagent the smallest useful brief instead of making one context carry every workstream.
Interactive model
See the context change.
Route one repository question without importing its whole search trace into the main task.
Specialist returns a finding
- 01
Main: own objective and edit
- 02
Explore: search and inspect
- 03
Explore: return relevant paths
- 04
Main: consume concise result
- 05
Main: implement and verify
Conceptual demonstration. Counts illustrate the flow, not measured production savings.
How it works
Less context. Same thread of work.
Delegation is useful when exploration, shell work, or another independent task would flood the main session with intermediate detail. DistilCode’s task tool resolves a named specialist, creates a child session linked to its parent, and returns the child’s result to the caller.
The caller can select a configured model class, resume an existing task session, or run eligible work in the background. Depth limits and derived permissions constrain delegation. This is deliberate routing, not an unsupported claim that every task is automatically sent to a cheaper model.
In practice
The operating loop
- 01
Classify the work
The task names a specialist such as explore or smartbash and may request a configured model class.
- 02
Isolate the context
A child session receives its own prompt and permission set while retaining a parent relationship.
- 03
Return the result
Foreground tasks return a bounded result; independent tasks can run in the background when enabled.
