Is your feature request related to a problem?
ai.tool() internally calls task.triggerAndWait() but only passes metadata. There's no way to forward priority, tags, or other trigger options to the subtask. The only workaround is skipping ai.tool() entirely and writing custom tool() wrappers.
Describe the solution you'd like to see
Add a triggerOptions field to ToolOptions that gets merged into the triggerAndWait call:
ai.tool(myTask, {
triggerOptions: {
priority: 200,
tags: ["user:abc", "type:onboarding"],
},
});
Describe alternate solutions
Subtasks spawned via ai.tool() could automatically inherit the parent run's priority and tags.
Additional information
Relevant for any agentic workflow using priority-based queue ordering where subtasks should respect the parent's priority.