Consolidation retry loop keeps issuing redundant LLM calls when the remote decision circuit breaker is open

Open
#7,251 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
ai, backend

Research direction

Start by tracing the remote retry loop and its circuit-breaker handling, then compare the issue’s linked fix branch and tests. Reproduce the open-breaker case with the decision adapter unavailable and check that the loop makes one attempt before falling back to the existing generative path; other provider errors should retain their retry behavior.

Written by the indexing model from the issue text.

Description

core

Problem

When a remote decision-model endpoint becomes unavailable (adapter down, network partition),
the engine's remote retry path keeps issuing redundant attempts against the dead endpoint.
In production we measured decision-path p50 latency of ~8.3s under an open breaker, versus
~0.56s after treating circuit-open as terminal.

Proposal

Treat an open circuit breaker as a terminal condition in the remote retry loop: skip further
attempts until the breaker's cooldown elapses, and fall back to the existing generative path
immediately. This does not change retry policy for other provider errors.

Reproduction

Synthetic lab setup: decision adapter bound to a local port, adapter process killed mid-run,
consolidation triage triggered repeatedly. Observed N redundant attempts per operation while
the breaker was already open; with the terminal check, one attempt then immediate fallback.

Evidence

Branch with fix + tests (4 passed, ruff clean): https://github.com/BenedettiLucca/hindsight/tree/fix/circuit-open-terminal

Related: #6928 (Hermes client retries — different layer).

Dominant language
Python
Stars
45.2k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vectorize-io/hindsight

All issues in vectorize-io/hindsight

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.