Delegate a task to a child AI agent in a dependent repository.
The child agent executes the task in the target repo and returns the result. Use after initializing a Polygraph session with start_session. Optionally specify the agent type (claude, opencode, codex) and pass a taskId to route follow-up messages to an existing active run rather than starting a new one.
Arguments
Section titled “Arguments”| Name | Type | Required | Description |
|---|---|---|---|
sessionId | string | yes | The Polygraph session ID. |
target | string | yes | Repo name or ID to delegate to. |
instruction | string | yes | Task instruction for the child agent. |
context | string | no | Background context about the task. |
agent | enum | no | AI agent implementation to use for the delegated task. One of: claude, opencode, codex. |
taskId | string | no | Optional task id from a prior delegate call. Pass this to target a follow-up message at a specific active task instead of starting a new run. Unknown task ids are ignored and a fresh run is started. |