Hey @strong-ice-84145
I was looking inside the two PRs.
What I found:
The two PRs chase the same symptom ("agent-server freezes while waiting on an LLM") but fix two different locks:
- PR 4012 (simonrosenberg): the process-wide litellm.modify_params lock. A blocking with around await freezes the whole event loop when a sync call (e.g. the condenser) holds it. This is the actual mechanism behind the reported "freezes during condensation / local inference".
- PR 4009 (yours): the per-conversation state FIFOLock held across astep. It blocks other ops on the same conversation (send_message, WS snapshots) during a model turn — a real but different problem. It does not fix the reported condensation freeze.
So: not duplicates — complementary. They don't overlap in code.
What to do
1. Land 4012 first — it directly fixes the reported freeze, small and low-risk (1 file). Flag two nits: possible lock leak if the coroutine is cancelled between run_in_executor acquire and the try, and confirm nothing re-enters after RLock→Lock.
2. Keep 4009, reframed as "allow message interjection / snapshots during a model turn" — a separate improvement, not a competitor. It's the better-tested PR but more invasive (new FIFOLock hand-off primitive).
3. Don't close either as a dup of the other.