Repository navigation
feat(agents): fold invoke_agent into delegate_task with a saved-agent parameter - #141
Merged
Merged
Conversation
bryantderosier
added this pull request to stack #120
September 14, 2026 12:23
bryantderosier
requested review from
BastiHu,
Jacksondr5 and
tyler-barton-horizon
September 14, 2026 12:25
bryantderosier
force-pushed
the
feature/agent-delegate-task
branch
2 times, most recently
from
September 14, 2026 13:14
de51d7c to
54e899d
Compare
Base automatically changed from
feature/agent-library-review-fixes
to
j5/main
September 14, 2026 21:36
… parameter Jackson's review: invoke_agent was a J5-only wrapper around the same delegated- child engine upstream's delegate_task uses, and personas give delegate_task a purpose again. J5 now registers its own delegate_task with upstream's input plus an optional agent (saved agent id). With agent, the J5 invocation module resolves the definition, route, and permissions and passes the pinned assignment through OrchestratorMcpService.delegateTask; target and runtimeMode are refused alongside it. Without agent, it is upstream's plain child delegation. task_status and task_cancel return unchanged so a parent can follow the child. Raw thread creation stays excluded. Provider instructions, tool inventories, FORK.md, and the agent tools definition follow. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Jacksondr5
force-pushed
the
feature/agent-delegate-task
branch
from
September 14, 2026 21:36
54e899d to
591f6b3
Compare
tyler-barton-horizon
approved these changes
Sep 15, 2026
tyler-barton-horizon
left a comment
Collaborator
There was a problem hiding this comment.
Mechanics look right: refusing target/runtimeMode alongside agent, passing title and mode through, keeping task_status/task_cancel unchanged, and the integration test covers all three paths. Approving with one text fix I'd like in before merge (the tool description), plus two optional nits.
Reviewed with Claude Fable 5.1 in Claude Code.
…eam's text Upstream's description tells the model to use delegate_task for any subagent request, which contradicts the orchestration instructions that keep ordinary subagent work provider-native. The J5 tool now carries its own description: the saved-agent use leads, the plain child is the fallback for cross-provider or T3-tracked work, and the mechanics (modes, timeouts, task_status) stay. Also notes why the target/runtimeMode destructure exists and corrects the agent-tools page on what orchestrator_capabilities advertises. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Collaborator
Author
|
Addressed all three comments in 34592c8 (description rewritten for J5, destructure comment, agent-tools wording). Threads resolved; J5 CI is running on that head. |
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.
From Jackson's review on #124:
invoke_agentwas a J5-only wrapper around the same delegated-child engine that upstream'sdelegate_taskuses, and saved agents givedelegate_taska purpose again.J5 now registers its own
delegate_task(apps/server/src/j5/agents/agentDelegation.ts): upstream's input plus an optionalagent(a saved agent id from an@agent:IDmention or the Settings → Agents library), and upstream's description plus one sentence aboutagent. Withagent, the J5 invocation module resolves the definition, route, and permissions and passes the pinned assignment throughOrchestratorMcpService.delegateTask;targetandruntimeModeare refused alongside it because the agent pins them. Withoutagent, it is upstream's plain child delegation.task_statusandtask_cancelreturn unchanged so a parent can follow the child. Raw thread creation (create_threads,t3_thread_start,t3_thread_send,t3_thread_interrupt) stays excluded.invoke_agentis removed; the provider mention instructions, the exact MCP tool inventories, FORK.md, and the agent tools definition follow.Validation
delegate_taskwithagent, the refusal oftarget/runtimeModewithagent, and the plain path); server typecheck and lint clean.Merge order
Part of GitHub stack
120, on top of #140.🤖 Generated with Claude Code