agent-zero/extensions
wgnr-ai 663d4b5e79 fix: prevent silent chat death and reduce streaming overhead
Three-factor compound failure causing chat sessions to silently stall:

1. Silent Exception Death (helpers/defer.py):
   DeferredTask._on_task_done() captures exceptions in Future but
   no code reads it. Chat sessions die with zero UI feedback.
   Fix: Log exceptions and notify AgentContext on task failure.

2. O(n²) Per-Chunk DirtyJson Parsing (agent.py):
   stream_callback runs extract_json_root_string() + json_parse_dirty()
   on EVERY streaming chunk with growing string length.
   Fix: Only parse when full.rstrip() ends with } or ].

3. Indefinite History Compression Wait:
   organize_history_wait has await task.result() with no timeout.
   Fix: Wrap with asyncio.wait_for() 30s timeout.

Amplifier: All chats share one EventLoopThread singleton,
making concurrent sessions particularly affected.
2026-04-10 02:17:22 +00:00
..
python fix: prevent silent chat death and reduce streaming overhead 2026-04-10 02:17:22 +00:00
webui Update API endpoint URL and refactor self-update modal handling with extension hooks 2026-03-25 18:39:30 +01:00