Skip to content

feat: subagent as task#2508

Draft
amitksingh1490 wants to merge 7 commits intomainfrom
task_tool_final
Draft

feat: subagent as task#2508
amitksingh1490 wants to merge 7 commits intomainfrom
task_tool_final

Conversation

@amitksingh1490
Copy link
Contributor

  • feat(task): add task tool for agent delegation with session resumption
  • feat(task): capitalize task tool name and prevent self-delegation in task tool
  • style(tests): reformat function call arguments to comply with line width limits

@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Mar 9, 2026
Comment on lines +713 to +717
"required": [
"agent_id",
"session_id",
"tasks"
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical schema bug: session_id is incorrectly listed in the required array but should be optional. The TaskInput struct defines session_id as Option<String> with #[serde(skip_serializing_if = "Option::is_none")], indicating it's optional. However, OpenAI's strict mode will reject any task tool calls that don't include this field.

Impact: All task tool invocations without session_id will fail with validation errors from OpenAI.

Fix: Remove "session_id" from the required array:

"required": [
  "agent_id",
  "tasks"
]
Suggested change
"required": [
"agent_id",
"session_id",
"tasks"
],
"required": [
"agent_id",
"tasks"
],

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenAI strict mode: required field exists with all property keys

@amitksingh1490 amitksingh1490 marked this pull request as draft March 9, 2026 15:24
@github-actions
Copy link

Action required: PR inactive for 5 days.
Status update or closure in 10 days.

@github-actions github-actions bot added the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Mar 15, 2026
@github-actions github-actions bot removed the state: inactive No current action needed/possible; issue fixed, out of scope, or superseded. label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant