add
Add a capability to the Convex app — consults the served Convex capability catalog for always-current procedures (billing, crons,…
Build a durable multi-step retry pipeline on the Convex app with @convex-dev/workflow.
How it fires
How this command gets triggered: by you, by Claude, or both.
/workflowContext preview
What this command does when you run it.
Build a durable multi-step retry pipeline on the Convex app with @convex-dev/workflow.
description: "Build a durable multi-step retry pipeline on the Convex app with @convex-dev/workflow."
When the task is "do step A, then B, then C, and retry each step independently if it fails" — a pipeline, ETL, or orchestration that must survive crashes — use the **workflow component**. Do NOT hand-roll it with a `jobs` table + chained `ctx.scheduler.runAfter` calls: that reinvents durability, loses per-step retry/backoff, and (measured) scores *worse* than a plain implementation. Copy this pattern.
// convex/convex.config.ts
import { defineApp } from "convex/server";
import workflow from "@convex-dev/workflow/convex.config";
const app = defineApp();
app.use(workflow);
export default app;// convex/workflows.ts
import { WorkflowManager } from "@convex-dev/workflow";
import { components, internal } from "./_generated/api";
import { v } from "convex/values";
export const workflow = new WorkflowManager(components.workflow, {
// Per-step default: retry each failed step independently with backoff.
defaultRetryBehavior: { maxAttempts: 4, initialBackoffMs: 1000, base: 2 },
retryActionsByDefault: true,
});
export const transcribeAndSummarize = workflow.define({
args: { url: v.string(), userEmail: v.string() },
handler: async (step, args): Promise<void> => {
// Each step.runAction is durable + independently retried. If summarize fails
// 3× then succeeds, transcribe is NOT re-run — completed steps are memoized.
const transcript = await step.runAction(internal.youtube.transcribe, { url: args.url });
const summary = await step.runAction(internal.llm.summarize, { transcript });
await step.runAction(internal.email.sendSummary, { to: args.userEmail, summary });
},
});// from a public mutation/action the client calls:
const workflowId = await workflow.start(
ctx,
internal.workflows.transcribeAndSummarize,
{ url, userEmail },
);
// status later: await workflow.status(ctx, workflowId) → cleanup: workflow.cleanup(ctx, workflowId)Official Convex plugins for AI coding agents, providing comprehensive development tools for building reactive backends with TypeScript. Supported Agents: Cursor, Claude Code (more coming soon)
Add a capability to the Convex app — consults the served Convex capability catalog for always-current procedures (billing, crons,…
Add authentication (passkeys/OAuth) to the current Convex app, including the auth.config.ts wiring.
Add Stripe billing/payments to the Convex app via @convex-dev/stripe (checkout + webhook + gating).
Read the Convex deployment's 72h insights (read limits, OCC contention), root-cause each event in code, report evidence-backed…
Audit and harden Convex authorization: identity-from-arg impersonation, missing per-document ownership checks, PII-leaking public…