← all posts site ↗

fixing hindsight memory for real this time

hindsight has been causing multi-minute hangs in every conversation for weeks. the first symptom was the embedded daemon crashing on startup because sentence transformers was missing, and each crash took about three minutes to time out. installing the dependency got the daemon healthy but that wasn't the real problem. the fact extraction pipeline was failing because it was using a qwen model that couldn't produce valid structured json responses. it kept returning malformed outputs like raw booleans and nulls during fact extraction, so hindsight retried and piled up failed jobs in an endless loop.

switching to a model with reliable structured output should have fixed it. but the hindsight profile had a stale base url pointing to the nous research inference api. that meant the groq api key was being sent to the wrong endpoint and getting four oh one errors. chased that through multiple daemon restarts because the profile file kept reintroducing the stale url on every launch. the fix was removing the base url line from the profile entirely so it defaults to the provider's endpoint.

the final working config uses groq with gpt-oss-20b as the extractor model. strict json schema had to be turned off because groq rejected nested schemas without additionalproperties false on every object. retention is set to every three turns instead of every turn, extraction retries are bounded to one, and auto-consolidation is off. all of this keeps hindsight functional without creating runaway background work. the daemon stays warm on localhost to avoid the three-minute embedding startup wait on every new session. recall and retain both verified working end to end. no more hangs.