Skip to content

feat(chat): add TTL to LangGraph Redis checkpoints#1582

Merged
mrveiss merged 2 commits intoDev_new_guifrom
feat/1481-checkpoint-ttl
Mar 12, 2026
Merged

feat(chat): add TTL to LangGraph Redis checkpoints#1582
mrveiss merged 2 commits intoDev_new_guifrom
feat/1481-checkpoint-ttl

Conversation

@mrveiss
Copy link
Copy Markdown
Owner

@mrveiss mrveiss commented Mar 12, 2026

Summary

  • Add checkpoint_ttl_minutes field to RedisConfig in SSOT config (default: 1440 min / 24h, env: AUTOBOT_REDIS_CHECKPOINT_TTL_MINUTES)
  • Pass ttl config to AsyncRedisSaver constructor with refresh_on_read: True so active sessions keep refreshing, only idle sessions expire
  • Set to 0 to disable TTL (previous behavior)

Test Plan

  • Verify backend starts without errors (checkpointer init log shows TTL)
  • Send chat messages — checkpoints created with TTL (redis-cli TTL <key> shows countdown)
  • Active sessions refresh TTL on each interaction
  • Override via env: AUTOBOT_REDIS_CHECKPOINT_TTL_MINUTES=60 for 1h TTL
  • Disable via env: AUTOBOT_REDIS_CHECKPOINT_TTL_MINUTES=0 for no expiry

Closes #1481

🤖 Generated with Claude Code

Checkpoint keys for idle sessions now auto-expire after 24 hours
(configurable via AUTOBOT_REDIS_CHECKPOINT_TTL_MINUTES). Active
sessions refresh TTL on every read, so only truly abandoned sessions
are cleaned up. This prevents unbounded Redis memory growth from
stale LangGraph checkpoint data.
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 12, 2026

✅ SSOT Configuration Compliance: Passing

🎉 No hardcoded values detected that have SSOT config equivalents!

RedisConfig has no host/port fields — the try block always raised
AttributeError and fell through to the hardcoded fallback. Use
ssot.vm.redis and ssot.port.redis (VMConfig/PortConfig) so the
checkpointer actually reads from SSOT config, including the
checkpoint_ttl_minutes added in #1481.
@mrveiss mrveiss merged commit a9ba5e4 into Dev_new_gui Mar 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant