Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When using xiaomi/mimo-v2-flash model with the active-memory plugin, API calls frequently timeout (15s threshold), but the plugin continues to retry indefinitely without any retry limit configuration. This causes:
- Token waste (API requests are sent and tokens consumed even on timeout)
- Context overflow when messages pile up
- Stuck sessions that remain in
processing state for 10+ minutes
Steps to reproduce
- Configure OpenClaw with a slow-responding model (e.g.,
xiaomi/mimo-v2-flash with 15s+ response times)
- Enable
active-memory plugin with default settings
- Have multiple conversations that trigger active-memory recall
- Observe repeated timeout events in gateway logs
- Check token usage - tokens are consumed despite timeouts
Expected behavior
When an API call times out:
- The plugin should stop retrying after a configurable number of attempts
- Token consumption should be minimized on timeout
- The system should gracefully degrade (skip memory recall) instead of infinite retry
Actual behavior
- No retry limit: The agent-runner layer retries indefinitely on timeout
- Token waste: Each timeout still consumes tokens (API request is sent)
- Context overflow: Messages pile up during retry loops, causing
Context overflow: estimated context size exceeds safe threshold
- Stuck sessions: Sessions remain in
processing state for 10+ minutes
- No circuit breaker: No mechanism to stop retries after repeated failures
OpenClaw version
2026.4.26 (be8c246)
Install method
npm global
Model
xiaomi/mimo-v2-flash
Provider / routing chain
openclaw -> xiaomi (direct API)
Additional provider/model setup details
"active-memory": {
"enabled": true,
"config": {
"agents": ["main"],
"queryMode": "recent",
"promptStyle": "balanced",
"maxSummaryChars": 220,
"logging": true,
"timeoutMs": 15000
}
}
Logs, screenshots, and evidence
API Timeout Events
[02:16:05.824] active-memory: agent=main session=agent:main:main
activeProvider=xiaomi activeModel=mimo-v2-flash
start timeoutMs=15000 queryChars=962
[02:16:24.172] active-memory: agent=main session=agent:main:main
activeProvider=xiaomi activeModel=mimo-v2-flash
done status=timeout elapsedMs=18350 summaryChars=0
[03:01:58.709] active-memory: agent=main session=...
activeProvider=xiaomi activeModel=mimo-v2-flash
start timeoutMs=15000 queryChars=434
[03:02:33.908] active-memory: agent=main session=...
activeProvider=xiaomi activeModel=mimo-v2-flash
done status=timeout elapsedMs=35201 summaryChars=0
Context Overflow
[03:06:57.804] [context-overflow-diag] sessionKey=agent:main:feishu:group:...
provider=xiaomi/mimo-v2-flash
source=assistantError
messages=116
error=Context overflow: estimated context size exceeds safe threshold during tool loop
Stuck Session
[03:15:46] stuck session: sessionId=main
sessionKey=agent:main:feishu:group:...
state=processing
age=493s (8+ minutes)
[03:17:46] stuck session: ... age=613s (10+ minutes)
Token Consumption
- Timeout rate: 100% (4/4 calls timed out)
- Average response time: 20.89s (threshold: 15s)
- Longest response: 35.20s (135% over threshold)
- Estimated token waste: Hundreds of thousands of tokens
Impact and severity
Affected: All users using slow-responding models with active-memory plugin
Severity: High
- Token waste (direct cost impact)
- Session stuck (blocks user interactions)
- Context overflow (degrades system stability)
Frequency: 100% timeout rate observed during testing
Consequence:
- Unnecessary token consumption
- Poor user experience (long waits, no responses)
- System instability (stuck sessions, context overflow)
Additional information
Root Cause Analysis
From source code analysis (/dist/extensions/active-memory/index.js):
-
Plugin has no retry limit configuration: The plugin only handles single-call timeout (15s), returns status: "timeout", and does not retry internally.
-
Agent-runner layer has no retry limit: When active-memory times out, the agent-runner triggers failover decisions but has no configurable retry limit.
-
Token already consumed on timeout: The API request is sent and tokens are consumed even when the response times out.
Suggested Fixes
-
Add retry limit configuration: Add maxRetries config option to active-memory plugin (e.g., 0-3 retries)
-
Add circuit breaker: Stop retries after N consecutive failures
-
Add timeout-aware token tracking: Track and report token consumption on timeout
-
Improve timeout handling: Cancel API request on client-side timeout to potentially save tokens
Temporary Workaround
Disable active-memory plugin or use a faster model:
"active-memory": {
"enabled": false
}
Or configure with a faster fallback model:
"active-memory": {
"config": {
"model": "deepseek/deepseek-v4-flash",
"modelFallback": "deepseek/deepseek-v4-flash"
}
}
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
When using
xiaomi/mimo-v2-flashmodel with theactive-memoryplugin, API calls frequently timeout (15s threshold), but the plugin continues to retry indefinitely without any retry limit configuration. This causes:processingstate for 10+ minutesSteps to reproduce
xiaomi/mimo-v2-flashwith 15s+ response times)active-memoryplugin with default settingsExpected behavior
When an API call times out:
Actual behavior
Context overflow: estimated context size exceeds safe thresholdprocessingstate for 10+ minutesOpenClaw version
2026.4.26 (be8c246)
Install method
npm global
Model
xiaomi/mimo-v2-flash
Provider / routing chain
openclaw -> xiaomi (direct API)
Additional provider/model setup details
Logs, screenshots, and evidence
API Timeout Events
Context Overflow
Stuck Session
Token Consumption
Impact and severity
Affected: All users using slow-responding models with active-memory plugin
Severity: High
Frequency: 100% timeout rate observed during testing
Consequence:
Additional information
Root Cause Analysis
From source code analysis (
/dist/extensions/active-memory/index.js):Plugin has no retry limit configuration: The plugin only handles single-call timeout (15s), returns
status: "timeout", and does not retry internally.Agent-runner layer has no retry limit: When active-memory times out, the agent-runner triggers failover decisions but has no configurable retry limit.
Token already consumed on timeout: The API request is sent and tokens are consumed even when the response times out.
Suggested Fixes
Add retry limit configuration: Add
maxRetriesconfig option to active-memory plugin (e.g., 0-3 retries)Add circuit breaker: Stop retries after N consecutive failures
Add timeout-aware token tracking: Track and report token consumption on timeout
Improve timeout handling: Cancel API request on client-side timeout to potentially save tokens
Temporary Workaround
Disable active-memory plugin or use a faster model:
Or configure with a faster fallback model: