Skip to content

Tool-call arguments occasionally become empty object with kimi-coding/k2p5 #54442

Description

@traceless929

Summary

When using kimi-coding/k2p5 (Anthropic Messages API) in OpenClaw, tool calls intermittently arrive with empty arguments ({}), causing validation failures such as:

  • Validation failed for tool \"exec\": command: must have required property 'command'
  • Similar behavior also observed for tools requiring required fields (e.g. web_search.query, gateway.action).

Switching the same agent/session behavior to openai-codex/gpt-5.4 significantly reduces the issue.

Environment

  • OpenClaw: 2026.3.23-2
  • OS: Linux 5.15.0-100-generic
  • Node: 22.22.1
  • Model with issue: kimi-coding/k2p5 (api: anthropic-messages)
  • Comparison model: openai-codex/gpt-5.4 (issue much less frequent)

Representative logs

From session transcript:

Validation failed for tool "exec":
  - command: must have required property 'command'

Received arguments:
{}

There are multiple consecutive occurrences in a single session where the assistant emits toolCall for exec with arguments: {}.

Repro pattern (not 100% deterministic)

  1. Use kimi-coding/k2p5 as agent model.
  2. Run in a long-context conversation (memory-heavy/system-heavy prompt).
  3. Ask for short imperative actions (e.g., "execute", "check status", etc.).
  4. Observe occasional tool calls emitted without required arguments.

Expected behavior

If model tool-call output is missing required fields, OpenClaw should ideally:

  • optionally auto-repair/retry once with strict schema reminder, or
  • fail gracefully with a model-side fallback strategy.

Actual behavior

OpenClaw correctly rejects invalid calls, but repeated {} tool calls can loop/flood errors in a session.

Request

Could maintainers confirm whether this is a known compatibility issue for specific model providers, and whether OpenClaw should add a resilience layer (auto-retry / required-field guardrail) for malformed tool arguments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions