Bug Report: Isolated session tools schema serialization fails with kimi-coding provider
Summary
When using kimi-coding/k2p5 provider with anthropic-messages API type, isolated sessions (e.g., cron jobs with sessionTarget: "isolated") fail to execute tools due to schema serialization error. Main/direct sessions work correctly.
Environment
- OpenClaw version: 2026.3.2
- Provider: kimi-coding
- API type: anthropic-messages
- Model: k2p5
Configuration
{
"models": {
"providers": {
"kimi-coding": {
"baseUrl": "https://api.kimi.com/coding/",
"api": "anthropic-messages",
"models": [{
"id": "k2p5",
"name": "Kimi for Coding",
"contextWindow": 262144,
"maxTokens": 32768
}]
}
}
}
}
Steps to Reproduce
- Configure kimi-coding provider with anthropic-messages API type
- Create a cron job with
sessionTarget: "isolated"
- Cron task attempts to use tools (e.g.,
web_search, web_fetch, read)
- Error occurs immediately on first tool call
Expected Behavior
Isolated session should serialize tools schema correctly for Kimi's anthropic-messages API, just like main sessions do.
Actual Behavior
[Error: request could not be processed]
{"error":{"message":"23 validation errors:
{'type': 'missing', 'loc': ('body', 'tools', 0, 'function'), 'msg': 'Field required', 'input': {'name': 'read', 'description': '...', 'input_schema': {...}}}"
}}
Key Observations
- Main/direct sessions work fine - The same configuration works correctly for interactive chat
- Only isolated sessions fail - Cron jobs with
sessionTarget: "isolated" consistently fail
- Tools schema format issue - Error suggests OpenClaw is sending:
{"name": "read", "description": "...", "input_schema": {...}}
But Kimi's anthropic-messages endpoint expects:
{"type": "function", "function": {"name": "read", "description": "...", "parameters": {...}}}
Workaround
Change cron job to use sessionTarget: "main" instead of "isolated", though this risks polluting the main session context.
Related Issues
Possible Root Cause
The tool schema serialization logic for isolated sessions may be using a different code path than main sessions, or may not be properly handling the anthropic-messages API format for Kimi.
Labels: bug, provider/kimi-coding, session/isolated, tools
Bug Report: Isolated session tools schema serialization fails with kimi-coding provider
Summary
When using
kimi-coding/k2p5provider withanthropic-messagesAPI type, isolated sessions (e.g., cron jobs withsessionTarget: "isolated") fail to execute tools due to schema serialization error. Main/direct sessions work correctly.Environment
Configuration
{ "models": { "providers": { "kimi-coding": { "baseUrl": "https://api.kimi.com/coding/", "api": "anthropic-messages", "models": [{ "id": "k2p5", "name": "Kimi for Coding", "contextWindow": 262144, "maxTokens": 32768 }] } } } }Steps to Reproduce
sessionTarget: "isolated"web_search,web_fetch,read)Expected Behavior
Isolated session should serialize tools schema correctly for Kimi's anthropic-messages API, just like main sessions do.
Actual Behavior
Key Observations
sessionTarget: "isolated"consistently fail{"name": "read", "description": "...", "input_schema": {...}}{"type": "function", "function": {"name": "read", "description": "...", "parameters": {...}}}Workaround
Change cron job to use
sessionTarget: "main"instead of"isolated", though this risks polluting the main session context.Related Issues
Possible Root Cause
The tool schema serialization logic for isolated sessions may be using a different code path than main sessions, or may not be properly handling the
anthropic-messagesAPI format for Kimi.Labels: bug, provider/kimi-coding, session/isolated, tools