Skip to content

21. Dynamic Workflows at Scale (Escaping the AI Chat Window Bottleneck)

October 19, 2026 · 44 min

Show notes

In Episode 21 of Beyond Prompting, author Sho Shimoda explores how to break through the manual chat window bottleneck by programmatically orchestrating AI agents using Dynamic Workflows. When coordinating large-scale engineering tasks across a codebase, managing dozens of parallel tasks manually through a chat transcript becomes a major bottleneck. In this episode, we break down:

    • When Scripts Beat Conversations: The three conditions that justify a workflow script—large volume (20+ items), complete task independence, and aggregated findings.
    • JavaScript Workflow Mechanics: Writing deterministic orchestration scripts using agent(), pipeline(), parallel(), phase(), and log(), while enforcing strict replayability rules that block non-deterministic calls like Date.now() or import().
    • Prompt Caching at Scale: How Claude Code holds parallel agent fan-outs briefly at startup so subagents share a single cached prompt prefix, dramatically lowering execution costs.
    • Security & Execution Boundaries: Why workflows require explicit user invocation via the ultracode keyword and cannot be triggered automatically by untrusted webhooks, scheduled tasks, or pull request comments.
    • The Two-Phase Pattern: Designing trustworthy automation through a two-phase architecture—Phase 1 surveys and generates candidate findings, while Phase 2 runs an adversarial verification step on each finding before aggregating results.

(Note for listeners: This episode covers Chapter 21 of Sho Shimoda's book RUNNING CLAUDE: The Operator’s Guide to Chat, Cowork and Claude Code, available on Amazon as the successor book to Master Claude: Chat, Cowork and Code).

All episodes of Master Claude Chat, Cowork, Code

Settings

Display

Language

Decides which stations you see first on the home page.

History

Recently played stations and episodes and your latest searches are only stored in this browser.

Notifications

A short notice when a podcast you follow has a new episode. Turn off single podcasts with the bell on their page.

Account

Save favorites – in the app and on the website.

Keyboard shortcuts

/
Open search
Space
Play or pause
← →
In the player: back 15 s, forward 30 s (episodes) · in a row: next tile
↑ ↓
In a row: target within the tile
Home / End
In a row: first or last tile
Esc
Close window or menu
?
This overview
Now playing

Go to station page

Play next

    Add episodes with “Play next” – they play after the current episode.