The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(tui_gateway): a turn with no staged messages carries no persisted_turn receipt
Teknium04d82877c84e
diff --git a/tui_gateway/prompt_turn.py b/tui_gateway/prompt_turn.pyindex 6229244ef65..da089226139 100644--- a/tui_gateway/prompt_turn.py+++ b/tui_gateway/prompt_turn.py@@ -876,8 +876,11 @@ def _persisted_turn_receipt(st: _TurnRun, raw: Any, status: str) -> dict | None:prefix is unchanged when every history row kept its committed row id."""from agent.persisted_turn_receipt import committed_row_id, persisted_turn_receipt+ messages = st.result.get("messages")+ if not isinstance(messages, list):+ return None # no turn suffix to address (failed/preflight turns never staged history)return persisted_turn_receipt(- st.result.get("messages"), getattr(st.agent, "_persist_user_message_idx", None), st.history,+ messages, getattr(st.agent, "_persist_user_message_idx", None), st.history,raw, status,compression_unchanged=type(st.compression_count) is int and st.compression_count == getattr(getattr(st.agent, "context_compressor", None), "compression_count", None),