-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
bugSomething isn't workingSomething isn't workingpythonworkflowsRelated to Workflows in agent-frameworkRelated to Workflows in agent-framework
Description
Description
AgentExecutor keeps session.service_session_id when a downstream executor is invoked with a replayed full conversation (including prior function-call/tool-result items).
This can cause provider calls to include both:
- a server-side continuation pointer (
previous_response_idviaservice_session_id), and - the same historical items explicitly in input.
Expected behavior: when full conversation is explicitly replayed to an agent executor, service_session_id should be cleared/reset before agent.run(...).
Steps To Reproduce
- Run:
pytest packages/core/tests/workflow/test_full_conversation.py::test_run_request_with_full_history_clears_service_session_id --runxfail -q
- Observe assertion failure that the downstream spy agent still sees
resp_PREVIOUS_RUN.
Code Sample
# Existing repro in repo:
# packages/core/tests/workflow/test_full_conversation.py
# test_run_request_with_full_history_clears_service_session_idError Messages / Stack Traces
E AssertionError: assert 'resp_PREVIOUS_RUN' is None
E + where 'resp_PREVIOUS_RUN' = <...>._captured_service_session_id
Package Versions
- agent-framework-core:
1.0.0rc2 - agent-framework-orchestrations:
1.0.0b260225 - Source commit tested:
02ba27493(main)
Python Version
Python 3.13.5
Additional Context
Likely area:
packages/core/agent_framework/_workflows/_agent_executor.py(from_response,_run_agent*)
Related xfail note in test references issue #4047.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpythonworkflowsRelated to Workflows in agent-frameworkRelated to Workflows in agent-framework