AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(copilot): set session_id on mode-switch T1 to enable --resume on subsequent turns
majdyz4efa1c431079
diff --git a/autogpt_platform/backend/backend/copilot/sdk/service.py b/autogpt_platform/backend/backend/copilot/sdk/service.pyindex 19f151f008..ed27b7c134 100644--- a/autogpt_platform/backend/backend/copilot/sdk/service.py+++ b/autogpt_platform/backend/backend/copilot/sdk/service.py@@ -2915,9 +2915,10 @@ async def stream_chat_completion_sdk(sdk_options_kwargs_retry.pop("resume", None)sdk_options_kwargs_retry["session_id"] = session_idelse:- # T2+ retry without --resume: do not pass --session-id.- # The T1 session file already exists at that path; re-using- # the same ID would fail with "Session ID already in use".+ # T2+ retry without --resume: initial invocation used+ # --resume, which restored the T1 session file to local+ # storage. Re-using session_id without --resume would+ # fail with "Session ID already in use".sdk_options_kwargs_retry.pop("resume", None)sdk_options_kwargs_retry.pop("session_id", None)# Recompute system_prompt for retry — ctx.use_resume may have