feat(chat): add TTL to LangGraph Redis checkpoints#1582
Merged
mrveiss merged 2 commits intoDev_new_guifrom Mar 12, 2026
Merged
Conversation
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.
✅ 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
checkpoint_ttl_minutesfield toRedisConfigin SSOT config (default: 1440 min / 24h, env:AUTOBOT_REDIS_CHECKPOINT_TTL_MINUTES)ttlconfig toAsyncRedisSaverconstructor withrefresh_on_read: Trueso active sessions keep refreshing, only idle sessions expire0to disable TTL (previous behavior)Test Plan
redis-cli TTL <key>shows countdown)AUTOBOT_REDIS_CHECKPOINT_TTL_MINUTES=60for 1h TTLAUTOBOT_REDIS_CHECKPOINT_TTL_MINUTES=0for no expiryCloses #1481
🤖 Generated with Claude Code