feat(delegate): add DELEGATION_GUIDANCE to the system prompt - #10269
MestreY0d4-Uninter wants to merge 1 commit into
Conversation
|
Thanks for the clean PR — this is well-scoped and follows the existing injection pattern correctly. After reviewing this against the other guidance blocks, we're going to pass on this one. Here's the reasoning: The existing guidance constants (
The cost side matters too: this text would be sent on every API call, for every user, for the entire session — permanent system prompt growth for a behavioral nudge the model doesn't need. If delegation ends up genuinely underused in practice, the right fix would be improving the tool schema description itself rather than adding a separate guidance block. Appreciate the contribution though — the pattern matching and test structure were solid. |
Summary
DELEGATION_GUIDANCEto the system prompt so the parent agent knows when to usedelegate_taskdelegate_taskis actually availableTOOL_USE_ENFORCEMENT_GUIDANCEthat delegating withdelegate_taskcounts as valid tool useWhy
delegate_taskwas implemented and validated but underused in practice because the system prompt never told the model when delegation was appropriate. Other meta-tools (memory,session_search,skill_manage) already had dedicated guidance blocks; delegation did not.This change adds a short, conservative guidance block with prospective triggers:
Test plan
python3 -m pytest tests/agent/test_delegation_guidance.py tests/agent/test_prompt_builder.py -o "addopts=" -qgpt-5.4where a complex prompt triggereddelegate_taskand completed 3 parallel tasks successfullyNotes
feat/delegate-task-tiers)