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): refresh Redis session meta TTL during long-running turns
Root cause of empty session on reload: the session meta key in Redis has a 1h TTL set once at create_session time. Turns exceeding 1h (like session d2f7cba3 at 82min) cause the meta key to expire, making get_active_session return False. The resume endpoint then returns 204 and the frontend shows an empty session. Fix: publish_chunk now periodically refreshes the meta key TTL (every 60s) when session_id is provided. stream_and_publish already has session_id and passes it through. This keeps the meta key alive for as long as chunks are being published. GCP logs confirmed the bug: at 09:49 (73 min into the turn), GET_SESSION returned active_session=False, msg_count=1 — the meta key had expired 13 minutes earlier.
Z
Zamil Majdy committed
a504fe532a8141c35b089f110d4feebd41d66690
Parent: b3f52ce