You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Desktop] select_tools reloads built-in Agent and causes duplicate tool name HTTP 400 #4717
Loading the built-in Agent / AgentSwarm tools through select_tools makes the next model request fail with HTTP 400 because Agent is present in both request-level tools and message-level tools. The session then becomes unusable: Continue and resuming it reproduce the same failure.
Environment
Kimi Code Desktop 1.3.1
Windows
Model: kimi-code/k3.1-pro
Long-running restored session
Steps to reproduce
In a session where the built-in Agent tools are available, invoke:
{"names":["Agent","AgentSwarm"]}
through select_tools after the tool set has changed.
The tool returns Loaded: Agent, AgentSwarm.
On the next model request, the API rejects the request:
duplicate tool name Agent between request-level tools and message tools at message position 933
provider.api_error · HTTP 400
Click Continue, or resume the session and try again. The same error remains at message position 933.
The failing request had 934 messages; position 933 is the final tool-result message produced by select_tools. It appears that loading the tool adds message-level schemas without deduplicating the existing request-level Agent schema.
Expected behavior
Tool loading should deduplicate schemas by name across request-level and message-level definitions, or reject an already-loaded built-in tool locally without poisoning subsequent requests.
Actual behavior
Every later model call is rejected before generation, so the task cannot continue in that session.
Request IDs (2026-11-05, UTC+8)
20:52:17 — 10e97fd8743b6e382fb19025f657cc93
20:53:26 — 4d2b1aad9d5447d562f8577949d579aa
20:59:45 — 912f1cc20b49ac085eed874a78654981
No conversation logs or business code are attached to keep the report sanitized. I can provide a minimal sanitized wire excerpt if needed.
Activity