ezyE
Convex Community10mo ago
1 reply
ezy

Workflow retry from step

Hi all!

I’ve been working with workflow component and building a multi-step process. I'm curious about the journaling and retry mechanisms.

For example, let’s say I have 3 actions:
- The first action creates a threadId for an agent.
- The second action uses that threadId to call Gemini via the "agent" component.
- The third action fails 50/50 (for testing).

The response from Gemini is quite large, and I’d like to avoid repeating it if a later step fails. I know there’s a built-in retry mechanism, which works fine, but what happens if maxAttempts is reached and the workflow ends in a "failed" state?

Ideally, I don’t want to repeat the earlier steps. I would like to resume the workflow from the point of failure. Is there a way to manually trigger this kind of retry, for example using the
workflowId
? Or would it be better to store the workflow progress in db and check before each action whether that step has already been completed?
Was this page helpful?