Shell Script Runs 10 AI Tasks in Parallel, Cutting 15-Minute Waits to 90 Seconds
A solo developer built a shell-based orchestration tool called orchestrate-codex-worker.sh to eliminate sequential wait times in AI-assisted development workflows. The script assigns one worker per task, allowing a parent script to launch multiple Codex workers simultaneously in the background rather than queuing them one after another. Running ten image-generation tasks in parallel reduces total processing time from roughly 15 minutes to about 90 seconds — the duration of the slowest single task. Each worker writes its progress to an individual status file, giving the parent script real-time visibility into every job's state without waiting for the full batch to complete. To avoid API rate limits and manage load, the developer's system splits daily article-generation jobs across two scheduled runs via launchd, with workers isolated in separate git worktrees to prevent file conflicts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in