AsyncRedisSaver.setup() calls async methods without awaiting #800

Closed
opened 2026-02-20 17:41:50 -05:00 by yindo · 1 comment
Owner

Originally created by @harshit-jn-9 on GitHub (Jul 13, 2025).

Checked other resources

  • This is a bug, not a usage question. For questions, please use GitHub Discussions.
  • I added a clear and detailed title that summarizes the issue.
  • I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
  • I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.

Example Code

from langgraph.checkpoint.redis import AsyncRedisSaver
import asyncio

async def main():
    saver = AsyncRedisSaver(redis_url="redis://localhost:6379")
    await saver.setup()  # <- causes RuntimeWarning

asyncio.run(main())

Error Message and Stack Trace (if applicable)

RuntimeWarning: coroutine 'AsyncSearchIndex.create' was never awaited
  self.checkpoints_index.create(overwrite=False)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
...

Description

AsyncRedisSaver.setup() internally calls AsyncSearchIndex.create() (which is async) without using await, leading to RuntimeWarning: coroutine was never awaited and runtime issues.

Expected Behaviour:
The setup() method should either:

  • Be defined as async def setup(...), so the caller knows to await it, or
  • Internally await the coroutines like .create(...), or
  • Clearly document that the user is responsible for calling await saver.checkpoints_index.create(...) directly (which isn't ideal).

Suggested Fix:
Update AsyncRedisSaver.setup() to:
async def setup(self): await self.checkpoints_index.create(overwrite=False) await self.checkpoint_blobs_index.create(overwrite=False) await self.checkpoint_writes_index.create(overwrite=False)

Temporary Workaround:
Use RedisSaver instead of AsyncRedisSaver until the issue is fixed.

System Info

  • langgraph-checkpoint-redis: 0.0.8
  • redis: 6.2.0
  • Python: 3.12
  • OS: macOS Sequoia 15.5
Originally created by @harshit-jn-9 on GitHub (Jul 13, 2025). ### Checked other resources - [x] This is a bug, not a usage question. For questions, please use GitHub Discussions. - [x] I added a clear and detailed title that summarizes the issue. - [x] I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example). - [x] I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue. ### Example Code ```python from langgraph.checkpoint.redis import AsyncRedisSaver import asyncio async def main(): saver = AsyncRedisSaver(redis_url="redis://localhost:6379") await saver.setup() # <- causes RuntimeWarning asyncio.run(main()) ``` ### Error Message and Stack Trace (if applicable) ```shell RuntimeWarning: coroutine 'AsyncSearchIndex.create' was never awaited self.checkpoints_index.create(overwrite=False) RuntimeWarning: Enable tracemalloc to get the object allocation traceback ... ``` ### Description AsyncRedisSaver.setup() internally calls AsyncSearchIndex.create() (which is async) without using await, leading to RuntimeWarning: coroutine was never awaited and runtime issues. **Expected Behaviour:** The setup() method should either: - Be defined as async def setup(...), so the caller knows to await it, or - Internally await the coroutines like .create(...), or - Clearly document that the user is responsible for calling await saver.checkpoints_index.create(...) directly (which isn't ideal). **Suggested Fix:** Update AsyncRedisSaver.setup() to: `async def setup(self): await self.checkpoints_index.create(overwrite=False) await self.checkpoint_blobs_index.create(overwrite=False) await self.checkpoint_writes_index.create(overwrite=False) ` **Temporary Workaround:** Use RedisSaver instead of AsyncRedisSaver until the issue is fixed. ### System Info - langgraph-checkpoint-redis: 0.0.8 - redis: 6.2.0 - Python: 3.12 - OS: macOS Sequoia 15.5
yindo added the bugpending labels 2026-02-20 17:41:50 -05:00
yindo closed this issue 2026-02-20 17:41:50 -05:00
Author
Owner

@hinthornw commented on GitHub (Jul 13, 2025):

Hello - thanks for raising! Could you open an issue on the Redis checkpointer repo? https://github.com/redis-developer/langgraph-redis

It's maintained by the Redis team rather than us :) thank you for using LangGraph!

@hinthornw commented on GitHub (Jul 13, 2025): Hello - thanks for raising! Could you open an issue on the Redis checkpointer repo? https://github.com/redis-developer/langgraph-redis It's maintained by the Redis team rather than us :) thank you for using LangGraph!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#800