From 3c91ba4050e43941dbbd3fd053cf022960622fcb Mon Sep 17 00:00:00 2001 From: Peter Ibekwe Date: Thu, 30 Apr 2026 19:00:25 -0700 Subject: [PATCH] Fix conversation ID dot parsing for http executor --- .../_workflows/_executors_http.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/python/packages/declarative/agent_framework_declarative/_workflows/_executors_http.py b/python/packages/declarative/agent_framework_declarative/_workflows/_executors_http.py index 3df7a2bca1..0a91748c6b 100644 --- a/python/packages/declarative/agent_framework_declarative/_workflows/_executors_http.py +++ b/python/packages/declarative/agent_framework_declarative/_workflows/_executors_http.py @@ -405,12 +405,9 @@ class HttpRequestActionExecutor(DeclarativeActionExecutor): messages_path = _get_messages_path(state, conversation_id_expr) if messages_path is None: return - # Ensure the conversation entry exists so downstream agents can reference it. - evaluated_id = messages_path.split(".", 2)[2].rsplit(".", 1)[0] - conversations: dict[str, Any] = state.get("System.conversations") or {} - if evaluated_id not in conversations: - conversations[evaluated_id] = {"id": evaluated_id, "messages": []} - state.set("System.conversations", conversations) + # Mirrors InvokeAzureAgentExecutor: rely on state.append to lazily + # create the conversation entry. Avoids re-parsing the id back out + # of the dotted path string. message = Message(role="assistant", contents=[body]) state.append(messages_path, message)