Master Claude Chat, Cowork, Code

← Master Claude Chat, Cowork, Code19 okt · 44 min

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

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

<p>In Episode 21 of <strong>Beyond Prompting</strong>, author Sho Shimoda explores how to break through the manual chat window bottleneck by programmatically orchestrating AI agents using <strong>Dynamic Workflows</strong>. 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:</p><ul><ul><li><strong>When Scripts Beat Conversations:</strong> The three conditions that justify a workflow script—large volume (20+ items), complete task independence, and aggregated findings.</li></ul><ul><li><strong>JavaScript Workflow Mechanics:</strong> 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().</li></ul><ul><li><strong>Prompt Caching at Scale:</strong> How Claude Code holds parallel agent fan-outs briefly at startup so subagents share a single cached prompt prefix, dramatically lowering execution costs.</li></ul><ul><li><strong>Security &amp; Execution Boundaries:</strong> Why workflows require explicit user invocation via the ultracode keyword and cannot be triggered automatically by untrusted webhooks, scheduled tasks, or pull request comments.</li></ul><ul><li><strong>The Two-Phase Pattern:</strong> 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.</li></ul></ul><p><em>(Note for listeners: This episode covers Chapter 21 of Sho Shimoda&#39;s book </em><a href="https://www.amazon.com/dp/B0HJKBWKVQ" target="_blank" rel="noopener noreferer"><strong>RUNNING CLAUDE: The Operator’s Guide to Chat, Cowork and Claude Code</strong></a><em>, available on Amazon as the successor book to </em><strong>Master Claude: Chat, Cowork and Code</strong><em>).</em></p>