openclaw - 💡(How to fix) Fix [Bug]: **Tool execution failures with Kimi K2.5 model - "missing tool result in session history" errors** [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59060Fetched 2026-04-08 02:29:17
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×1subscribed ×1

Experiencing systematic tool execution failures when using moonshot/kimi-k2.5 as the default model. Multiple tools return "missing tool result in session history; inserted synthetic error result for transcript repair" errors, causing the agent to get stuck in loops repeating the same message.

Error Message

Experiencing systematic tool execution failures when using moonshot/kimi-k2.5 as the default model. Multiple tools return "missing tool result in session history; inserted synthetic error result for transcript repair" errors, causing the agent to get stuck in loops repeating the same message.

  • Agent should receive actual tool results, not synthetic error placeholders

Root Cause

Experiencing systematic tool execution failures when using moonshot/kimi-k2.5 as the default model. Multiple tools return "missing tool result in session history; inserted synthetic error result for transcript repair" errors, causing the agent to get stuck in loops repeating the same message.

Fix Action

Fix / Workaround

  • Critical: Automated workflows (morning greetings, scheduled tasks) completely broken
  • High: Calendar, weather, memory search functionality unavailable
  • Medium: Subagent spawning and orchestration broken
  • Workaround: Manual responses without tool execution

Code Example

openclaw config set agents.defaults.model moonshot/kimi-k2.5

---

Full gateway log excerpt available if needed. Key errors repeat consistently on every startup.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Experiencing systematic tool execution failures when using moonshot/kimi-k2.5 as the default model. Multiple tools return "missing tool result in session history; inserted synthetic error result for transcript repair" errors, causing the agent to get stuck in loops repeating the same message.

Steps to reproduce

  1. Set default model to moonshot/kimi-k2.5:

    openclaw config set agents.defaults.model moonshot/kimi-k2.5
  2. Restart gateway

  3. Attempt any tool execution (read, memory_search, exec, etc.)

  4. Observe "missing tool result in session history" errors in response

  5. Agent loops repeating the same message

Expected behavior

  • Tool execution should work reliably across all supported models
  • File watchers should initialize without exhausting file descriptors
  • Agent should receive actual tool results, not synthetic error placeholders
  • Gateway startup should complete without EMFILE errors

Actual behavior

  • Tool calls fail with "missing tool result in session history" errors
  • File descriptor exhaustion occurs within seconds of startup
  • Agent gets stuck in message loops
  • Some tools work while others fail (inconsistent behavior)

OpenClaw version

v2026.3.23

Operating system

  • OS: Linux 6.8.0-106-generic (x64) - Node: v22.22.1 - Runtime: Docker container (rootless/non-systemd)

Install method

docker

Model

Moonshot Kimi -k2.5 / Claude-Sonnet-4-5

Provider / routing chain

moonshot/moonshot-v1-128k

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Full gateway log excerpt available if needed. Key errors repeat consistently on every startup.

Impact and severity

  • Critical: Automated workflows (morning greetings, scheduled tasks) completely broken
  • High: Calendar, weather, memory search functionality unavailable
  • Medium: Subagent spawning and orchestration broken
  • Workaround: Manual responses without tool execution

Additional information

  • Full gateway logs
  • Additional debugging output
  • Test cases
  • Configuration files (sanitized)

Gateway restart (via kill -TERM <PID>) - Errors persist immediately on restart 2. ⚠️ Switch to Claude Sonnet 4.5 - Partially effective (read works, exec/memory_search still fail) 3. ❌ Increase ulimit - Already at 524,288 (high limit)

Affected Tools (with Kimi K2.5)

  • read - Reading SKILL.md files
  • memory_search - Memory search queries
  • sessions_spawn - Spawning subagents
  • exec - Shell command execution
  • web_fetch - Web fetch operations (intermittent)

extent analysis

TL;DR

Switching to a different model, such as Claude Sonnet 4.5, may partially resolve the tool execution failures, but a more comprehensive solution is needed to address the underlying issues.

Guidance

  1. Verify model compatibility: Confirm that the moonshot/kimi-k2.5 model is compatible with the current OpenClaw version (v2026.3.23) and operating system (Linux 6.8.0-106-generic).
  2. Investigate file descriptor exhaustion: Although increasing the ulimit is already at a high limit (524,288), further investigation into the file descriptor exhaustion issue may reveal other contributing factors, such as inefficient file handling or resource leaks.
  3. Analyze gateway logs: Examine the full gateway log excerpt to identify any patterns or correlations between the "missing tool result in session history" errors and other system events or errors.
  4. Test with alternative models: In addition to Claude Sonnet 4.5, test other models to determine if the issue is specific to moonshot/kimi-k2.5 or a more general problem.
  5. Check for updates or patches: Look for any available updates or patches for OpenClaw, the moonshot/kimi-k2.5 model, or other dependencies that may address the underlying issues.

Notes

The issue seems to be related to the specific model moonshot/kimi-k2.5 and may be caused by a combination of factors, including model compatibility, file descriptor exhaustion, and potential resource leaks. A thorough investigation and testing with alternative models and configurations are necessary to determine the root cause and develop a comprehensive solution.

Recommendation

Apply a workaround by switching to a different model, such as Claude Sonnet 4.5, which has shown partial effectiveness in resolving the tool execution failures. This temporary solution can help mitigate the critical impact on automated workflows while further investigation and testing are conducted to address the underlying issues.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • Tool execution should work reliably across all supported models
  • File watchers should initialize without exhausting file descriptors
  • Agent should receive actual tool results, not synthetic error placeholders
  • Gateway startup should complete without EMFILE errors

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING