Repository navigation
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Summary
The active-memory plugin's circuit breaker is far too aggressive by default, and when it opens, OpenClaw silently injects a fallback prompt string ("Agent couldn't generate a response. Please try again.") into the main session's prompt context. This causes two user-visible problems:
- The circuit breaker opens permanently after only a handful of transient failures, with no visible status indicator anywhere in the user-facing UI.
- The fallback string gets injected into the main LLM prompt, polluting context and misleading the main model about what just happened.
Reproduction
- Enable
plugins.entries.active-memory(setenabled: true). - Configure a model that occasionally returns an empty response (e.g.
minimax/MiniMax-M3). - Send 3–5 user messages. The model returns empty 1–2 times →
empty response detected → retrying 1/1fires. - After ~5–7 cumulative failures, the circuit breaker opens permanently. Subsequent recalls return
status=unavailableimmediately without calling the model. - The string
Agent couldn't generate a response. Please try again.now appears in the injected untrusted context (<active_memory_plugin>block) of every main-session prompt, indefinitely. - Even if the underlying model recovers, the circuit breaker does not reset within a reasonable window — there is no way for the user to know it is open except by grepping gateway logs.
Expected
- The default
circuitBreakerMaxTimeoutsshould be high enough (e.g. ≥ 10) that transient flakiness does not permanently disable the plugin. circuitBreakerCooldownMsshould reset the breaker on a reasonable interval (e.g. ≤ 60 s) so the plugin self-heals.- When the circuit breaker is open,
active-memoryshould either:- silently skip (no injected fallback string), or
- emit a visible status indicator (log line, tool output, or heartbeat entry) so users can diagnose.
- The
empty response detected → retrying 1/1path should not blindly retry the same prompt on the same model — consider degrading to a fallback model on the second retry. - The two config keys
circuitBreakerMaxTimeoutsandcircuitBreakerCooldownMsare accepted at runtime but are not documented in the plugin schema and not surfaced in the gateway health report. They should be documented, validated, and visible inopenclaw doctor/openclaw plugins describe active-memory.
Actual
- After ~5–7 transient failures, circuit breaker opens.
- The fallback string
Agent couldn't generate a response. Please try again.is injected into the main session on every recall attempt. - No visible way to know the breaker is open, except reading gateway logs and counting
active-memory done status=unavailablelines. - Default values appear to be roughly
maxTimeouts ≤ 5andcooldownMs ≥ 5 min, which is too strict for production traffic.
Environment
- OpenClaw v2026.6.1 (commit
2e08f0f) - Platform: Linux container, Node v22.22.2
- Model:
minimax/MiniMax-M3viahttps://api.minimaxi.com/anthropic/v1/messages(MiniMax platform) - Reproduced after fresh gateway restart with
MINIMAX_API_KEYcorrectly injected in env
Workaround (current)
Set in plugins.entries.active-memory.config:
{
"circuitBreakerMaxTimeouts": 20,
"circuitBreakerCooldownMs": 60000
}This reduces the failure rate but does not eliminate the fallback-string pollution.
Suggested fix
- Raise the default
circuitBreakerMaxTimeoutsto 10 andcircuitBreakerCooldownMsto 60_000. - When the breaker is open, do not inject the fallback string into the main session — return a silent no-op.
- Document the two config keys in the plugin schema and surface them in
openclaw plugins describe active-memory. - Add a
circuitBreakerOpenflag toopenclaw doctorso users can see at a glance when active-memory is degraded. - On
empty response detected, skip the same-model retry and go directly to a configured fallback model (e.g.plugin.config.fallbackModel).
Reacted by clawsweeper and Hansen1018
Reacted by clawsweeper
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Activity
clawsweeper commentedon Jun 4, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Close as implemented: current Active Memory no longer turns an open circuit breaker into the reported fallback prompt, it resets after the documented one-minute cooldown, and the configuration is now validated and documented. Requests to raise the intentionally documented threshold further or add runtime model failover are separate product-policy work, not evidence that the reported current behavior remains broken.
Root-cause cluster
Relationship:
fixed_by_candidateCanonical: #120658
Summary: The merged repair directly addresses the failed-recall prompt-contamination portion of this report; current source also shows bounded breaker recovery.
Members:
canonical: fix(active-memory): keep recall errors out of prompt context #120658 - Merged on 2026-08-28 and explicitly repairs failed-recall prompt contamination discussed by this issue.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Keep the shipped error-exclusion and bounded circuit breaker; discuss any higher default threshold, Doctor state, or runtime model failover as a separate Active Memory product decision.
Do we have a high-confidence way to reproduce the issue?
No live current-main run was performed; source inspection shows the reported breaker path now returns a timeout with no summary and therefore cannot prepend the historical fallback text.
Is this the best way to solve the issue?
Yes for the reported defect: the merged owner-boundary repair excludes error payloads before context construction, while the breaker is bounded, resettable, documented, and schema-validated.
Security review:
Security review: This is issue triage with no proposed patch to assess.
AGENTS.md: found and applied where relevant.
What I checked:
extensions/active-memory/recall.ts:246, bc82742f7b04)extensions/active-memory/recall-run.ts:337, bc82742f7b04)extensions/active-memory/types.ts:28, bc82742f7b04)Likely related people:
Codex review notes: model internal, reasoning high; reviewed against bc82742f7b04; fix evidence: release v2026.9.1, commit c2a0e706e7a4.
Hansen1018 commentedon Jun 4, 2026
+1 Repro: same bug, two trigger modes (consolidated)
I previously left two separate +1 comments with overlapping evidence. Consolidating into one clean repro now per maintainer workflow preference. Both comments deleted; this replaces them.
Environment: OpenClaw v2026.6.1 (commit
2e08f0f), Linux container, Node v22, primary modelminimax-portal/MiniMax-M3.Trigger A — OAuth 24h quota exhaustion
minimax-portalruns on an OAuth token with a 24-hour usage cap separate from the token'sexpires_in. We hitusage: 24h 0% leftwhile the token was stillok expires in 365d. The provider actively aborts every fetch withname=AbortErrorandelapsedMsof 11ms–3.3s — clearly not a network issue.Three raw
model-fetcherrors during one stuck window:active-memorysees the embedded fetch fail → empty response →emptyRetries=1/1exhausted →incomplete turn ... surfacing error to user.Trigger B — inbound fallback injection (not just outbound)
Once Trigger A (or transient flakiness) trips the breaker, the fallback string is injected into the inbound prompt envelope, not just the outbound reply. A user in a Telegram group sent a normal reply, and the main agent received this as the user-role block:
From the main agent's context window this is indistinguishable from the user typing that string verbatim. The
<active_memory_plugin>framing is supposed to mark it as untrusted, but the surrounding<actual user content>arrives as a separate user message right after, so the main model often tries to answer the injected string instead of ignoring it.This means a non-trivial fraction of "weird bot replies" users observe may actually be the main LLM attempting to address the injected fallback block, not a real reply to the user's content.
Repro determinism
While OAuth 24h quota is at 0%, every inbound to any agent using
minimax-portalas primary will arrive with this<active_memory_plugin>block prepended bybefore_prompt_build. We can keep producing timestamps as long as it lasts.Three asks for maintainers
circuitBreakerMaxTimeoutsto a sane default (e.g. ≥ 10) and document it. Grepping the dist for the constant in 2e08f0f doesn't surface a clear binding — the schema /openclaw plugins describe active-memoryshould expose it.active-memoryshould either silently skip (no injected content) or emit a clearly-machine-tagged side channel (log / heartbeat / tool result) the main model is not asked to address. The current<active_memory_plugin>framing is not strong enough to prevent the main LLM from answering the string.Happy to provide more logs, gateway config dump, or a config-side reproduction that doesn't burn OAuth quota.
13 remaining items