agent_manager start becomes list under strict Responses API tool calling
Description
When using the OpenAI Response API models (including those accessed via ChatGPT subscription) in kilo code, and requesting the agent_manager to create an independent branch for a subagent with mode: "worktree", the Response API's strict schema enforcement forces the model to return a value for optional fields.
Since the schema does not accept null, even when the model is instructed to pass action: null to indicate omitting the parameter, the tool still ends up receiving action: "list". As agent_manager does not accept null, it interprets "list" as a valid action and returns an overview instead of creating a new branch or session.
I can reproduce it with an OpenAI Responses API model (e.g. GPT-5.6 Sol). And the chat-completions models are ok (e.g. Kimi-K3, Qwen 3.8 Max).
Plugins
None
Kilo version
7.4.20
Steps to reproduce
- Configure Kilo Code with an OpenAI Responses API model.
- Ask the agent to delegate an implementation task by creating an Agent Manager worktree session.
- The agent constructs a start request using mode: "worktree", "versions" and a non-empty tasks array.
- Inspect the actual arguments received by the agent_manager tool.
The intended call is effectively:
{
"mode": "worktree",
"versions": false,
"tasks": [
{
"prompt": "balabala...",
"name": "a new name",
"branchName": "a-new-branch"
}
]
}
But the actual call received by the tool is:
{
"mode": "worktree",
"versions": false,
"tasks": [
{
"prompt": "balabala…",
"name": "a new name",
"branchName": "a-new-branch",
"model": "",
"variant": ""
}
],
"action": "list",
"filter": null,
"sessionID": "",
"prompt": "",
"sectionID": null
}
The tool then returns:
{
"instructions": "This overview is the source of truth. Use sections[].id as sectionID and sessions[].id/session.id as sessionID for action=move. Do not edit .kilo/agent-manager.json.",
"sections": [],
"ungrouped": [],
"local": {
"branch": "dev",
"sessions": [],
"git": {
"additions": 1,
"deletions": 1,
"ahead": 0,
"behind": 0
}
}
}
and no worktree session is created.
Screenshot and/or share link
Operating System
macOS 26.6.1
Terminal
macOS Terminal
This is fixed in v7.4.21 via PR #12695. Responses-family providers now explicitly send function tools with strict: false, preventing OpenAI from filling optional agent_manager fields with placeholder values such as action: "list". Upgrading from v7.4.20 to v7.4.21 should restore worktree session creation.
Fixed in v7.4.21 via PR #12695 — Responses-family providers now send function tools with strict: false, preventing OpenAI from filling optional agent_manager fields with placeholder values like action: "list". Upgrading from 7.4.20 to 7.4.21+ should resolve this.