openclaw - 💡(How to fix) Fix [Feature]: Enhance with failure summary and fix suggestions

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…

Enhance openclaw sessions diagnose with a top-level failure summary, actionable fix suggestions, and per-round failure details to make troubleshooting stuck sessions faster.

Error Message

  • Total failure count with failures grouped by kind (model error, tool error, tool timeout, session error, etc.)
  • Up to 3 entries per kind with round number, timestamp, tool name, and error message [tool error] (1) [model error] (1)

Root Cause

Enhance openclaw sessions diagnose with a top-level failure summary, actionable fix suggestions, and per-round failure details to make troubleshooting stuck sessions faster.

Code Example

Session Diagnosis: my-session
==================================================
Classification: tool_call -- Executing tool: bash

Summary
----------------------------------------
  2 failure(s) found:
  [tool error] (1)
    Round 3 14:23:01  bash: command not found
  [model error] (1)
    Round 2 14:22:45  model: rate limit exceeded

Suggested fixes:
  - Session is stuck on a tool call. Check tool availability and permissions.
  - Tool failures detected (bash). Verify tool configs and dependencies.
  - Model call errors detected. Check API key, rate limits, and provider health.
RAW_BUFFERClick to expand / collapse

Summary

Enhance openclaw sessions diagnose with a top-level failure summary, actionable fix suggestions, and per-round failure details to make troubleshooting stuck sessions faster.

Problem to solve

Currently sessions diagnose outputs a detailed execution timeline but lacks a quick-glance overview of what went wrong. Users must scroll through every round to find failures, and there's no guidance on what to do next. This makes triaging stuck or failing sessions slower than necessary, especially for sessions with many rounds.

Proposed solution

  1. Summary section at the top of text output (both full and brief modes) showing:
    • Total failure count with failures grouped by kind (model error, tool error, tool timeout, session error, etc.)
    • Up to 3 entries per kind with round number, timestamp, tool name, and error message
  2. Suggested fixes section with actionable debug advice derived from:
    • Session classification (quota suspended, subagent wedged, lock held, stale, etc.)
    • Failure patterns (tool failures → check configs; model errors → check API key/rate limits; timeouts → check service reachability)
  3. Per-round failure summary in the timeline: rounds with errors get a [FAILURES] tag in the header and a consolidated failure list after the event lines
  4. Brief mode (--brief) also receives the summary section, and now shows tool.call arguments before a failure for context
  5. JSON output (--json) includes failures[] and fixSuggestions[] fields for programmatic consumption

Alternatives considered

  • Relying solely on the existing brief mode (--brief) to surface errors — but it still requires scanning each round and doesn't provide fix guidance.
  • Adding a separate sessions triage command — but extending the existing diagnose command keeps the surface area smaller and puts all diagnostic info in one place.

Impact

  • Affected: Anyone using openclaw sessions diagnose to troubleshoot stuck sessions (operators, developers, support)
  • Severity: Medium — current output is functional but slow to parse
  • Frequency: Daily for active operators managing multiple agents
  • Consequence: Faster triage, less manual scrolling, actionable next steps without external knowledge

Evidence/examples

Reference PR with implementation: https://github.com/heliubj18/openclaw/pull/1

Example output with the enhancement:

Session Diagnosis: my-session
==================================================
Classification: tool_call -- Executing tool: bash

Summary
----------------------------------------
  2 failure(s) found:
  [tool error] (1)
    Round 3 14:23:01  bash: command not found
  [model error] (1)
    Round 2 14:22:45  model: rate limit exceeded

Suggested fixes:
  - Session is stuck on a tool call. Check tool availability and permissions.
  - Tool failures detected (bash). Verify tool configs and dependencies.
  - Model call errors detected. Check API key, rate limits, and provider health.

Additional information

All 19 existing tests pass. The changes are additive — no existing output fields are removed or renamed.

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING