From 2057977102da26cbf0fa9e699fa4432dbf017566 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Mon, 18 May 2026 11:45:35 -0700 Subject: [PATCH] fix(acp): use refresh moment as updated_at on session info push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow-up to #26543. The sessions table does not have an updated_at column (see hermes_state.py — only started_at/ended_at), so row.get('updated_at') always returned None and the str() coercion was dead code. Use datetime.now(UTC).isoformat() instead, which reflects exactly what the field means here: 'the title was refreshed at this moment'. Drop the dead coercion. --- acp_adapter/server.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/acp_adapter/server.py b/acp_adapter/server.py index 1f6064d67fa..26d5809d1a4 100644 --- a/acp_adapter/server.py +++ b/acp_adapter/server.py @@ -3,6 +3,7 @@ from __future__ import annotations import asyncio +from datetime import datetime, timezone import base64 import contextvars import json @@ -721,9 +722,11 @@ class HermesACPAgent(acp.Agent): return title = row.get("title") - updated_at = row.get("updated_at") - if updated_at is not None and not isinstance(updated_at, str): - updated_at = str(updated_at) + # The `sessions` table does not have an `updated_at` column (see + # hermes_state.py schema — only started_at/ended_at). Use "now" as + # the updated_at since we're emitting this notification precisely + # because the title was just refreshed. + updated_at = datetime.now(timezone.utc).isoformat() update = SessionInfoUpdate( session_update="session_info_update", title=title if isinstance(title, str) and title.strip() else None,