You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Agent memory recall silently skips its reranking stage on a normal install. The memory spec describes a five-stage retrieval pipeline ending in cross-encoder reranking, but GAIA refuses to load the cross-encoder whenever faiss is already imported and torch is not — which is exactly the state a running agent is in, because the memory index is faiss. So recall falls back to unreranked vector similarity on every conversation, and the only signal is one log line the user never sees.
The refusal itself is deliberate and correct in isolation: loading torch after faiss aborts the process with OMP: Error #15, which is a SIGABRT no except can catch. The problem is that the workaround has become the permanent state — the documented stage never runs, and nothing surfaces that to the user or to anyone reading recall quality.
Observed on every turn of a live flagship run on Ubuntu 24.04 / Ryzen AI 9 465.
Spec: docs/spec/agent-memory-architecture.md:439-447 (the Cross-Encoder Reranking stage, and stage 5 of the pipeline at :429).
Outcome
Either reranking actually runs on a standard install, or the spec and the module docstring stop claiming it does — and in both cases a user or a test can tell which state they are in without reading debug logs.
Acceptance criteria
On a standard install, a memory recall either runs the cross-encoder or reports that it did not — pick one and make it observable; today _get_cross_encoder() returns None and only a logger.warning records it
The state is readable without log scraping — e.g. gaia memory status (or the recall result) names the active retrieval stages, with reranking shown as on or off and the reason when off — expected off-state reason text: the OpenMP double-initialisation refusal, naming GAIA_ALLOW_FAISS_TORCH_OMP as the override
If reranking cannot be made to run by default, docs/spec/agent-memory-architecture.md:439-447 and the pipeline list at :429 say so, and src/gaia/agents/base/memory.py:17 ("Hybrid search: vector + BM25 + RRF fusion + cross-encoder reranking") is corrected to match
Unit test asserts the guard's outcome for both module states: faiss imported without torch → reranking reported off with the override named; GAIA_ALLOW_FAISS_TORCH_OMP=1 → reranking reported on
Scope & expectations
Where:src/gaia/agents/base/memory.py — _get_cross_encoder() (:387-430), the OpenMP guard helpers (:283-334), and the module docstring (:17); spec at docs/spec/agent-memory-architecture.md
Constraints: do not remove the guard without proving the two runtimes coexist on the target platform — the failure it prevents is a process abort, not an exception
How to verify
CLI surface: start an agent, run a memory recall, and show whether reranking ran — the status output or recall result, plus the same command with GAIA_ALLOW_FAISS_TORCH_OMP=1 for contrast.
🔍 Technical details
Claim class: reproduced (executed) — relayed. The observation comes from a live flagship run executed by another session on an Acer Swift (Ryzen AI 9 465, Radeon 880M, Ubuntu 24.04) at 572e8b79, where reranking was reported disabled on every turn. The code citations below were opened and checked against the tree.
src/gaia/agents/base/memory.py:405-417:
if (
"faiss"insys.modulesand"torch"notinsys.modulesandnot_omp_conflict_override()
):
logger.warning(
"[MemoryMixin] cross-encoder reranking disabled: faiss is already "
"loadedandimportingtorchalongsideitabortstheprocess ...
)
_CROSS_ENCODER_UNAVAILABLE=TruereturnNone
_CROSS_ENCODER_UNAVAILABLE is a module-level sentinel, so once the guard trips the process never retries for its lifetime.
Citation correction: the finding was reported against src/gaia/memory.py:408. No such file exists; the code is at src/gaia/agents/base/memory.py, guard block :405-417, warning at :407.
Problem
Agent memory recall silently skips its reranking stage on a normal install. The memory spec describes a five-stage retrieval pipeline ending in cross-encoder reranking, but GAIA refuses to load the cross-encoder whenever faiss is already imported and torch is not — which is exactly the state a running agent is in, because the memory index is faiss. So recall falls back to unreranked vector similarity on every conversation, and the only signal is one log line the user never sees.
The refusal itself is deliberate and correct in isolation: loading torch after faiss aborts the process with
OMP: Error #15, which is a SIGABRT noexceptcan catch. The problem is that the workaround has become the permanent state — the documented stage never runs, and nothing surfaces that to the user or to anyone reading recall quality.Observed on every turn of a live flagship run on Ubuntu 24.04 / Ryzen AI 9 465.
Spec:
docs/spec/agent-memory-architecture.md:439-447(the Cross-Encoder Reranking stage, and stage 5 of the pipeline at:429).Outcome
Either reranking actually runs on a standard install, or the spec and the module docstring stop claiming it does — and in both cases a user or a test can tell which state they are in without reading debug logs.
Acceptance criteria
_get_cross_encoder()returnsNoneand only alogger.warningrecords itgaia memory status(or the recall result) names the active retrieval stages, with reranking shown as on or off and the reason when off — expected off-state reason text: the OpenMP double-initialisation refusal, namingGAIA_ALLOW_FAISS_TORCH_OMPas the overridedocs/spec/agent-memory-architecture.md:439-447and the pipeline list at:429say so, andsrc/gaia/agents/base/memory.py:17("Hybrid search: vector + BM25 + RRF fusion + cross-encoder reranking") is corrected to matchfaissimported withouttorch→ reranking reported off with the override named;GAIA_ALLOW_FAISS_TORCH_OMP=1→ reranking reported onScope & expectations
src/gaia/agents/base/memory.py—_get_cross_encoder()(:387-430), the OpenMP guard helpers (:283-334), and the module docstring (:17); spec atdocs/spec/agent-memory-architecture.mdHow to verify
CLI surface: start an agent, run a memory recall, and show whether reranking ran — the status output or recall result, plus the same command with
GAIA_ALLOW_FAISS_TORCH_OMP=1for contrast.🔍 Technical details
Claim class:
reproduced (executed)— relayed. The observation comes from a live flagship run executed by another session on an Acer Swift (Ryzen AI 9 465, Radeon 880M, Ubuntu 24.04) at572e8b79, where reranking was reported disabled on every turn. The code citations below were opened and checked against the tree.src/gaia/agents/base/memory.py:405-417:_CROSS_ENCODER_UNAVAILABLEis a module-level sentinel, so once the guard trips the process never retries for its lifetime.Citation correction: the finding was reported against
src/gaia/memory.py:408. No such file exists; the code is atsrc/gaia/agents/base/memory.py, guard block:405-417, warning at:407.