fix(delegate): per-task model and reasoning_effort routing - #48867
Closed
neaucode-bot wants to merge 2 commits into
Closed
fix(delegate): per-task model and reasoning_effort routing#48867neaucode-bot wants to merge 2 commits into
neaucode-bot wants to merge 2 commits into
Conversation
…te_task _dispatch_delegate_task is the single dispatch site for delegate_task tool calls; top-level model and reasoning_effort from tool args were dropped, so workers always fell back to delegation.model / parent inheritance. Add regression test alongside the existing acp_args forwarding check. Co-authored-by: Cursor <cursoragent@cursor.com>
Wire per-task model/effort routing through delegate_task and _build_child_agent so _dispatch_delegate_task forwarding is end-to-end. Adds schema fields, per-task resolution in the batch loop, and tests. Co-authored-by: Cursor <cursoragent@cursor.com>
tonydwb
approved these changes
Jun 19, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Good per-task routing fix. The delegate now properly passes model and reasoning_effort per-task instead of relying on task defaults. No issues.
Looks Good
- 3 files changed, +145 -10 lines
- Clean delegation routing fix
- No test files touched (delegation logic)
Reviewed by Hermes Agent
3 tasks
This was referenced Jun 20, 2026
Author
|
Superseded by #52693 (re-opened from the neaucode-org org fork). Closing in favor of that PR. |
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.
Summary
modelandreasoning_effortfromdelegate_tasktool-call args throughAIAgent._dispatch_delegate_tasktodelegate_task().delegate_task()/_build_child_agent()with per-task resolution (task override > top-level >delegation.model/delegation.reasoning_effort> parent inherit).DELEGATE_TASK_SCHEMAand tool description so orchestrators can route individual children to different models/effort levels.TypeErrorat dispatch or silently fall back to config/parent defaults.Commits
c17dafb9b—_dispatch_delegate_taskforwarding inrun_agent.pyb79a3ed28—delegate_task()/_build_child_agent()acceptance + schema/testsTest plan
scripts/run_tests.sh tests/tools/test_delegate.py -- -k "TestDispatchDelegateTask or TestDelegationReasoningEffort or test_schema_has_model" -q(9 passed)test_model_and_reasoning_effort_forwarded— dispatch helper forwards kwargstest_model_and_reasoning_effort_forwarded_to_build_child_agent—delegate_taskpasses model/effort to_build_child_agenttest_per_task_override_reasoning_effort_beats_config— per-task effort beatsdelegation.reasoning_efforttest_schema_has_model_and_reasoning_effort_top_level_and_per_task— schema exposes new fields