-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
active-memory plugin: pins to one provider, no failover; timeout shorter than provider latency causes silent drops #79611
Copy link
Copy link
Open
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.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:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.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
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.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:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.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
Summary
The
active-memoryplugin (the optional blocking memory sub-agent that runs before eligible conversational sessions) has two related reliability issues:model/modelFallbackpair and does not waterfall through configured fallback providers when its model becomes unavailable. When the configured provider has all profiles in cooldown or returns a structured error, the plugin emitsFailoverErrorand drops the recall pass entirely instead of degrading gracefully.timeoutMsis the only knob for slow providers, butbefore_prompt_buildsimply times out without any structured signal back to the caller. When provider latency exceeds the configured timeout, the plugin silently fails on every turn, with no way for the host to learn that the timeout is the wrong knob.Environment
openclaw2026.5.7plugins.entries.active-memory{ "model": "google/gemini-3-flash-preview", "modelFallback": "google/gemini-3-flash-preview", "queryMode": "message", "timeoutMs": 30000, "circuitBreakerMaxTimeouts": 1, "circuitBreakerCooldownMs": 600000 }Evidence
Sub-bug 1 — no failover when provider unavailable
Live journal (today, between 19:16 and 22:30 EDT):
Note that the host gateway has fallback providers configured (claude-cli, openrouter chain) and the main agent path uses them successfully. Active-memory does not.
Sub-bug 2 — timeout < provider latency
Operator measurement (May 6, 2026, via running gateway probe):
google/gemini-3-flash-previewgoogle/gemini-2.5-flash-litePlugin defaults are documented at 3000–5000 ms. Operator pushed
timeoutMsto 30000, then 45000, and the plugin still times out:Two timeouts in 7 minutes on a 45 s budget when the underlying probe takes 17–25 s suggests cold-start / queue contention compounds on top of base latency, and the timeout itself is the wrong knob.
Reproduction
active-memorywithmodel: openai-codex/gpt-5.5(or any provider where you can force all profiles into cooldown).claude-cli,openrouter).failed: No available auth profile for openai-codexin the journal, and the active-memory recall pass is skipped entirely. The host's fallback chain is not consulted by the plugin.For sub-bug 2: configure
active-memorywith a model whose typical first-token latency exceedstimeoutMs(e.g.gemini-3-flash-previewattimeoutMs: 5000). Every turn fails withbefore_prompt_build handler from active-memory failed: timed out after Nms.Expected behavior
For #1 — failover
When the active-memory plugin's primary model fails with a recoverable error (
rate_limit,usage_limit_reached,auth_invalid, provider 5xx, transport closed), it should:fallback_providerschain (or its own configured fallback chain).credential_poolprofile rotation for each provider it tries.FailoverErrorafter exhausting the chain.For #2 — provider latency vs timeout
timeoutMsshould be a budget, but the plugin should additionally:timeoutMsis below observed p95, log alatency_budget_under_provider_p95warning once per cooldown window with the measured p95 value, instead of silently dropping every turn.timeoutMsfor N consecutive turns, to avoid wastingbefore_prompt_buildtime.Behavioral guarantees
timeoutMswhen the provider is already known to be unhealthy.Suggested test coverage
In
src/plugins/(active-memory plugin tests):timeoutMs: 5000; assert the plugin emitslatency_budget_under_provider_p95and circuit-breaker-trips after N consecutive timeouts.circuitBreakerCooldownMsskip the recall pass entirely without re-attempting.Impact
before_prompt_build failedline in the journal.Filed by
OpenClaw operator instance with corroborating journal evidence from a live Hermes deployment running
openclaw 2026.5.7. Hermes / OpenClaw pair share this plugin via the sameopenclawruntime package.