diff --git a/connector_builder_agents/src/run.py b/connector_builder_agents/src/run.py index de315a4..4fc7725 100644 --- a/connector_builder_agents/src/run.py +++ b/connector_builder_agents/src/run.py @@ -257,6 +257,11 @@ async def run_manager_developer_build( try: # We loop until the manager calls the `mark_job_success` or `mark_job_failed` tool. + # NOTE: previous_response_id is incompatible with SQLiteSession. SQLiteSession automatically + # maintains full conversation history across Runner.run() calls through persistent storage. + # Passing previous_response_id explicitly includes a response that SQLiteSession already loaded, + # causing OpenAI API to reject the request with "Duplicate item found with id ...". + # See: https://pypi.org/project/openai-agents/ for SQLiteSession documentation. # prev_response_id: str | None = None all_run_results = [] while not is_complete(session_state): @@ -268,7 +273,9 @@ async def run_manager_developer_build( # previous_response_id=prev_response_id, ) all_run_results.append(run_result) # Collect all run results - # prev_response_id = run_result.raw_responses[-1].response_id if run_result.raw_responses else None + # prev_response_id = ( + # run_result.raw_responses[-1].response_id if run_result.raw_responses else None + # ) status_msg = f"\n🤖 {run_result.last_agent.name}: {run_result.final_output}" update_progress_log(status_msg, session_state) run_prompt = (