For AI agents: fetch the complete documentation index at /llms.txt, the full documentation corpus at /llms-full.txt, the agent skill at /skill.md, or this page as Markdown at /docs/modules/task-recovery.md (or send Accept: text/markdown).
Task API and recovery
Recover an uncertain submission without creating a new task.
Before you begin
Open your downloaded supastack project in Visual Studio Code using File → Open Folder, then choose Terminal → New Terminal. The repository root is the folder containing package.json, apps and packages. Run the command below there and leave its terminal open. If a command is not recognized, finish the tool installation guide before continuing.
Read the platform tutorial first. A server is the app process that answers browser or phone requests. Web reads apps/web/.env.local, Expo reads apps/mobile/.env.local, and database migration commands read root .env. The no-database /dashboard demonstration is separate from real /auth accounts, which need migrated Postgres. A phone or desktop-only checkout needs a separately running Web backend.
- Install the tools and get the code
- Learn commands, files and configuration
- Complete the Web first-run tutorial
corepack pnpm --filter @supastack/web devSetup and configuration
POST /api/ai/tasks requires an authenticated workspace and active entitlement. A keyed request reserves an immutable task before dispatch. Idempotency-Key accepts 16–128 ASCII letters, digits, underscores, or hyphens.
POST /api/ai/tasks
Idempotency-Key: a-stable-client-submission-key
Recovery body: { "resume": true }
Status: GET /api/ai/tasks/{taskId}Implementation workflow
Persist the recovery key before submitting. After uncertain dispatch, reuse the same key and the resume body; the server loads the original input and retries the same task-scoped Trigger identity. Changed input under the same key returns 409 idempotencyConflict.
HTTP 202 after an ambiguous enqueue means dispatch is uncertain. It does not prove Trigger accepted the work. Already running or terminal tasks return saved state without another enqueue. Recovery still requires authentication, ownership, and entitlement.
Verification and troubleshooting
Exercise a lost response, changed-input conflict, foreign-workspace request, and refresh restoration. There is no automatic outbox dispatcher or end-to-end exactly-once guarantee. Do not reset a running task to queued without investigating its side effects.