← Public packages
@kentcdodds/cloudflare-connect-personal-software-ecosystem
I Built Your Personal Software Ecosystem: Kent C. Dodds's Cloudflare Connect 2026 lightning talk deck (Reveal.js). How Kody gives every user one of everything on Cloudflare.
Files
<section id="how-execute" data-slide="how-execute" data-title="Dynamic Workers run the agent's code" class="pw-slide">
<h2>Dynamic Workers run the agent's code</h2>
<!-- pw-flow:start -->
<div class="pw-host pw-host-flow pw-host-execute" data-pw="execute" data-pw-seq="[["ok", 9000], ["blocked", 8200]]" data-pw-still="ok" role="group" aria-label="An agent writes code, a Dynamic Worker runs it, its outbound fetch goes through the Kody gateway to the host, and the response comes back through the gateway and the worker to the agent">
<div class="pw pw-flow pw-flow-execute" style="--pw-accent:var(--primitive-secrets)"><div class="pw-stage" style="--pw-ratio:760 / 430"><div class="pw-run pwf-run" data-state="ok"><svg class="pw-wires" viewBox="0 0 760 430" aria-hidden="true" focusable="false"><g class="pw-wire pwf-wire" data-from="0" data-to="1" data-lane="0" data-on="" style="--d:0.2s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="1" data-to="2" data-lane="0" data-on="" style="--d:1.6s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="2" data-to="3" data-lane="0" data-on="" style="--d:3.0s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="3" data-to="2" data-lane="0" data-on="" style="--d:4.4s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="2" data-to="1" data-lane="0" data-on="" style="--d:5.2s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="1" data-to="0" data-lane="0" data-on="" style="--d:6.0s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g></svg><div class="pw-node pwf-card " data-lit="on" style="left:120px;top:96px;--d:0s"><span class="pwf-title"><span class="pw-icon" data-icon="claude" aria-hidden="true"></span><strong>Agent</strong></span><span class="pwf-sub">writes the code</span></div><div class="pw-node pwf-card " data-lit="on" style="left:540px;top:96px;--d:1.0s"><span class="pwf-title"><span class="pw-icon" data-icon="cloudflare" aria-hidden="true"></span><strong>Dynamic Worker</strong></span><span class="pwf-sub">a sandbox for that code</span><code class="pwf-code pwf-ref">credential('github')</code><code class="pwf-code">github.fetch("api.github.com")</code></div><div class="pw-node pwf-card " data-lit="on" style="left:540px;top:330px;--d:2.4s"><span class="pwf-title"><span class="pw-lock" aria-hidden="true"></span><strong>Kody gateway</strong></span><span class="pwf-sub">adds the key</span><span class="pwf-rule" data-on="">api.github.com <b>✓</b></span><span class="pwf-rule">paste.example <b>✕</b></span></div><div class="pw-node pwf-card " data-lit="on" style="left:120px;top:330px;--d:3.6s"><span class="pwf-title"><span class="pw-icon" data-icon="github" aria-hidden="true"></span><strong>api.github.com</strong></span><span class="pwf-sub">answers</span></div><span class="pwf-label" data-wire="0" data-dx="0" data-dy="-24" style="--d:0.4s"><code>execute</code></span><span class="pwf-label" data-wire="1" data-dx="74" data-dy="0" style="--d:1.8s">outbound fetch</span><span class="pwf-label" data-wire="2" data-dx="0" data-dy="-26" style="--d:3.2s">with the key</span><span class="pwf-label" data-wire="3" data-dx="0" data-dy="26" style="--d:4.6s"><code>200 OK</code></span><span class="pwf-label" data-wire="4" data-dx="-58" data-dy="0" style="--d:5.4s"><code>200 OK</code></span><span class="pwf-label" data-wire="5" data-dx="0" data-dy="26" style="--d:6.2s"><code>5 repos</code></span></div></div></div>
<div class="pw-controls"><button type="button" class="pw-control" data-pw-go="ok">Approved host</button><button type="button" class="pw-control" data-pw-go="blocked">Unapproved host</button></div>
<template data-pw-state="ok"><div class="pw-run pwf-run" data-state="ok"><svg class="pw-wires" viewBox="0 0 760 430" aria-hidden="true" focusable="false"><g class="pw-wire pwf-wire" data-from="0" data-to="1" data-lane="0" data-on="" style="--d:0.2s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="1" data-to="2" data-lane="0" data-on="" style="--d:1.6s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="2" data-to="3" data-lane="0" data-on="" style="--d:3.0s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="3" data-to="2" data-lane="0" data-on="" style="--d:4.4s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="2" data-to="1" data-lane="0" data-on="" style="--d:5.2s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="1" data-to="0" data-lane="0" data-on="" style="--d:6.0s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g></svg><div class="pw-node pwf-card " data-lit="on" style="left:120px;top:96px;--d:0s"><span class="pwf-title"><span class="pw-icon" data-icon="claude" aria-hidden="true"></span><strong>Agent</strong></span><span class="pwf-sub">writes the code</span></div><div class="pw-node pwf-card " data-lit="on" style="left:540px;top:96px;--d:1.0s"><span class="pwf-title"><span class="pw-icon" data-icon="cloudflare" aria-hidden="true"></span><strong>Dynamic Worker</strong></span><span class="pwf-sub">a sandbox for that code</span><code class="pwf-code pwf-ref">credential('github')</code><code class="pwf-code">github.fetch("api.github.com")</code></div><div class="pw-node pwf-card " data-lit="on" style="left:540px;top:330px;--d:2.4s"><span class="pwf-title"><span class="pw-lock" aria-hidden="true"></span><strong>Kody gateway</strong></span><span class="pwf-sub">adds the key</span><span class="pwf-rule" data-on="">api.github.com <b>✓</b></span><span class="pwf-rule">paste.example <b>✕</b></span></div><div class="pw-node pwf-card " data-lit="on" style="left:120px;top:330px;--d:3.6s"><span class="pwf-title"><span class="pw-icon" data-icon="github" aria-hidden="true"></span><strong>api.github.com</strong></span><span class="pwf-sub">answers</span></div><span class="pwf-label" data-wire="0" data-dx="0" data-dy="-24" style="--d:0.4s"><code>execute</code></span><span class="pwf-label" data-wire="1" data-dx="74" data-dy="0" style="--d:1.8s">outbound fetch</span><span class="pwf-label" data-wire="2" data-dx="0" data-dy="-26" style="--d:3.2s">with the key</span><span class="pwf-label" data-wire="3" data-dx="0" data-dy="26" style="--d:4.6s"><code>200 OK</code></span><span class="pwf-label" data-wire="4" data-dx="-58" data-dy="0" style="--d:5.4s"><code>200 OK</code></span><span class="pwf-label" data-wire="5" data-dx="0" data-dy="26" style="--d:6.2s"><code>5 repos</code></span></div></template>
<template data-pw-state="blocked"><div class="pw-run pwf-run" data-state="blocked"><svg class="pw-wires" viewBox="0 0 760 430" aria-hidden="true" focusable="false"><g class="pw-wire pwf-wire" data-from="0" data-to="1" data-lane="0" data-on="" style="--d:0.2s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="1" data-to="2" data-lane="0" data-on="" style="--d:1.6s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="2" data-to="3" data-lane="0" data-on="" data-kind="stop" style="--d:3.0s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="2" data-to="1" data-lane="0" data-on="" data-kind="stop" style="--d:4.4s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g><g class="pw-wire pwf-wire" data-from="1" data-to="0" data-lane="0" data-on="" data-kind="stop" style="--d:5.2s"><path class="pw-line"></path><path class="pw-shot" pathLength="100"></path></g></svg><div class="pw-node pwf-card " data-lit="on" style="left:120px;top:96px;--d:0s"><span class="pwf-title"><span class="pw-icon" data-icon="claude" aria-hidden="true"></span><strong>Agent</strong></span><span class="pwf-sub">writes the code</span></div><div class="pw-node pwf-card " data-lit="on" style="left:540px;top:96px;--d:1.0s"><span class="pwf-title"><span class="pw-icon" data-icon="cloudflare" aria-hidden="true"></span><strong>Dynamic Worker</strong></span><span class="pwf-sub">a sandbox for that code</span><code class="pwf-code pwf-ref">credential('github')</code><code class="pwf-code">github.fetch("paste.example")</code></div><div class="pw-node pwf-card " data-lit="on" style="left:540px;top:330px;--d:2.4s"><span class="pwf-title"><span class="pw-lock" aria-hidden="true"></span><strong>Kody gateway</strong></span><span class="pwf-sub">withholds the key</span><span class="pwf-rule">api.github.com <b>✓</b></span><span class="pwf-rule" data-on="" data-kind="stop">paste.example <b>✕</b></span></div><div class="pw-node pwf-card " data-lit="stop" style="left:120px;top:330px;--d:3.6s"><span class="pwf-title"><strong>paste.example</strong></span><span class="pwf-sub">nothing sent</span></div><span class="pwf-label" data-wire="0" data-dx="0" data-dy="-24" style="--d:0.4s"><code>execute</code></span><span class="pwf-label" data-wire="1" data-dx="74" data-dy="0" style="--d:1.8s">outbound fetch</span><span class="pwf-label" data-kind="stop" data-wire="2" data-dx="0" data-dy="-26" style="--d:3.2s">not sent</span><span class="pwf-label" data-kind="stop" data-wire="3" data-dx="-100" data-dy="0" style="--d:4.6s">host not allowed</span><span class="pwf-label" data-kind="stop" data-wire="4" data-dx="0" data-dy="26" style="--d:5.4s">error</span></div></template>
</div>
<!-- pw-flow:end -->
<aside class="notes">
The agent writes a module and calls execute. The Kody worker bundles it and hands it to
a Worker Loader, which mints a Dynamic Worker: a sandbox for that one module. Its
outbound fetch does not leave on its own. It goes through Kody's gateway, carrying only
the credential's handle. An approved host gets the key at the boundary and answers. The response comes
back the same way: host, gateway, Dynamic Worker, agent. An unapproved host gets
nothing, and the gateway's error takes the same road back. The agent never sees the value. kody.*
calls in the sandbox come back to the host over code-mode. Next: the Worker Loader call
itself.
</aside>
</section>