#4258·claude-mem

OpenRouter-compatible provider: a single 429 (rate_limit) pauses the generator for ~30 minutes; retries fire at ~100/236 ms

Author: peckopCreated Sep 28, 2026Updated Sep 28, 2026

Environment

  • claude-mem 13.27.1 (running worker; 13.28.0 code shows the same logic)
  • Windows 11, Claude Code (VS Code extension), ~7 concurrent sessions sharing one worker
  • Provider openrouter with CLAUDE_MEM_OPENROUTER_BASE_URL=https://integrate.api.nvidia.com/v1, model nvidia/nemotron-3-super-120b-a12b (NVIDIA build free tier, documented limit 40 requests/minute)

Observed

  • On a 429 the SDK retries twice after ~117 ms and ~236 ms (maxRetries: 2, baseDelayMs: 100); NVIDIA sends no Retry-After, so both retries also get 429.
  • Then OpenRouter paused on rate_limit; preserving buffered work arms a cooldown of about 30 minutes (armed 07:53:04Z, generator skipped with "Skipping generator start while the provider quota cooldown is active" until 08:23:04Z).
  • Average load was under 200 requests/hour, far below the provider limit; the 429s come from short bursts of parallel sessions. Over two days the pending queue grew from ~700 to ~2,860 observations because each burst costs 30 minutes of zero throughput.
  • Removing the openrouter entry from ~/.claude-mem/quota-cooldown.json does not resume the worker (checked for 68 s): the cooldown is held in memory, so only a worker restart would clear it, which the plugin itself advises against.

Expected

  • For kind=rate_limit without Retry-After, back off on a per-minute scale (e.g. 60 s, then exponential with a cap) instead of a fixed ~30-minute pause.
  • Optionally: make the rate-limit cooldown length configurable, and re-read the cooldown file so a manual clear takes effect without a restart.

Related note The Claude fallback path only triggers on quota_exhausted / key_invalid, so it never helps with 429s. In our logs over two days: rate_limit 86, transient 291, quota_exhausted 0.