From c8df4224220b757c71dace31b6f80fe7c9e50ad3 Mon Sep 17 00:00:00 2001 From: MaartenDMT Date: Mon, 3 Aug 2026 15:57:17 +0530 Subject: [PATCH] perf(gateway): reuse loaded turn config for timestamp check Re-derivation of PR #65645 onto current main: _build_gateway_agent_history already runs inside a turn whose config was loaded once into ctx.user_config; re-reading config from disk via _load_gateway_config() per turn is redundant. Reuse the loaded turn config. --- gateway/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gateway/run.py b/gateway/run.py index a3c5d8536ef11..4df2227ae4f0d 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -4965,7 +4965,7 @@ class TurnRunner: agent_history, observed_group_context = _build_gateway_agent_history( ctx.history, channel_prompt=ctx.channel_prompt, - inject_timestamps=_message_timestamps_enabled(_load_gateway_config()), + inject_timestamps=_message_timestamps_enabled(ctx.user_config), ) # FTS write-corruption guard (#50502): when message persistence