openclaw - 💡(How to fix) Fix [Bug] Session file lock timeout causes false model fallback (MiniMax ? DeepSeek)

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…

When a main session is in the middle of processing an embedded_run, subsequent runs (e.g., active-memory plugin, channel dispatches to the same session) fail to acquire the session JSONL write lock. This causes Gateway to record a false model failure - even though the primary model API call never actually started.

Root Cause

When a main session is in the middle of processing an embedded_run, subsequent runs (e.g., active-memory plugin, channel dispatches to the same session) fail to acquire the session JSONL write lock. This causes Gateway to record a false model failure - even though the primary model API call never actually started.

Fix Action

Fix / Workaround

When a main session is in the middle of processing an embedded_run, subsequent runs (e.g., active-memory plugin, channel dispatches to the same session) fail to acquire the session JSONL write lock. This causes Gateway to record a false model failure - even though the primary model API call never actually started.

RAW_BUFFERClick to expand / collapse

Description

When a main session is in the middle of processing an embedded_run, subsequent runs (e.g., active-memory plugin, channel dispatches to the same session) fail to acquire the session JSONL write lock. This causes Gateway to record a false model failure - even though the primary model API call never actually started.

Evidence

model_fallback_decision: requestedProvider: "minimax-portal" requestedModel: "MiniMax-M2.7" fallbackStepFromFailureReason: "unknown" fallbackStepFromFailureDetail: "session file locked (timeout 60000ms): pid=18948 C:\.openclaw\agents\main\sessions\uuid....lock"

Impact

  • Primary model unfairly swapped for fallback due to Gateway-internal locking, not model unavailability
  • User sees "model fallback" in logs and thinks MiniMax is unreliable
  • False negatives make it hard to diagnose real model issues
  • Cascading effect: when EventLoop is also blocked by weixin plugin, the problem compounds

Suggested Fix

  1. Separate the session lock timeout from the model failure classification - a failed lock should NOT count as a model failure attempt
  2. Implement non-blocking session writes (queue writes or async file handles instead of file lock)
  3. Make session lock timeout configurable

Environment

  • OS: Windows
  • Model: MiniMax-M2.7 (primary), deepseek-v4-flash (fallback)

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

openclaw - 💡(How to fix) Fix [Bug] Session file lock timeout causes false model fallback (MiniMax ? DeepSeek)