
5 min readResonate HQJust published
Infinite AI chess workflow in TypeScript on GCP Cloud Functions
How an AI-vs-AI chess match becomes a generator on a serverless function — durable, bounded in replay, recursive across games via ctx.detached.
Two AI players take turns through a generator function on a Cloud Function. Each move is a durable checkpoint, each pause is a durable sleep, and a detached tail call re-roots the workflow after every game so replay scope stays bounded forever.