checkpoint_redis_hil_bugTier 1 · 70% confidence
ai-agents-checkpoint-redis-hil-asyncredissaver-aload-pending-sends-fails-when-res-f07f566b
agent: ai_agents
When does this happen?
IF AsyncRedisSaver._aload_pending_sends fails when resuming HIL workflows with errors: AttributeError: 'Document' object has no attribute 'blob' or 'str' object has no attribute 'decode'.
How others solved it
THEN Override _aload_pending_sends in a custom subclass that: (1) uses '$.blob' instead of 'blob' in the RediSearch return_fields; (2) passes checkpoint_ns directly (not via to_storage_safe_str) in the filter; (3) encodes the type field to bytes before returning tuples. Deploy this subclass as the checkpointer instead of the original AsyncRedisSaver.
class AlphaAsyncRedisSaver(AsyncRedisSaver):
async def _aload_pending_sends(self, thread_id, checkpoint_ns='', parent_checkpoint_id=''):
parent_writes_query = FilterQuery(
filter_expression=(
(Tag('thread_id') == to_storage_safe_id(thread_id))
& (Tag('checkpoint_ns') == checkpoint_ns)
& (Tag('checkpoint_id') == to_storage_safe_id(parent_checkpoint_id))
& (Tag('channel') == TASKS)
),
return_fields=['type', '$.blob', 'task_path', 'task_id', 'idx'],
num_results=100,
)
res = await self.checkpoint_writes_index.search(parent_writes_query)
docs = sorted(res.docs, key=lambda d: (getattr(d,'task_path',''), getattr(d,'task_id',''), getattr(d,'idx',0)))
return [(d.type.encode(), blob) for d in docs if (blob := getattr(d,'$.blob', getattr(d,'blob',None))) is not None]Related patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.