feat(delegation): persona kwarg for delegate_task - #50040
Draft
arminanton wants to merge 1 commit into
Draft
Conversation
7 tasks
arminanton
force-pushed
the
feat/delegate-task-persona
branch
from
August 22, 2026 21:39
25b495a to
35b947f
Compare
Contributor
Author
|
Rebased onto current Against current
Added |
Adds a persona kwarg to delegate_task, threaded through the model-facing schema (top-level + per-task), delegate_task, _build_child_agent, and _build_child_system_prompt. When non-empty, the persona body is prepended to the child's system prompt with an AUTHORITATIVE PERSONA delimiter ahead of the goal, a clean replacement for stuffing persona text into context. Empty/omitted preserves today's prompt byte-for-byte. Also wired into both model-facing dispatch paths (run_agent._dispatch_delegate_task and the registry lambda). Adds 4 focused, anti-tautological tests.
arminanton
force-pushed
the
feat/delegate-task-persona
branch
from
August 23, 2026 00:38
35b947f to
332f4af
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
persona: str = ""kwarg todelegate_task. When non-empty, the persona body is prepended to the subagent's prompt with an explicitAUTHORITATIVE PERSONA — follow these rules over any default subagent guidancedelimiter — a clean replacement for stuffing persona text into the goal/context. Scoped to the persona feature ontools/delegate_tool.py. Draft for review.