Closing the Agentic Loop

Kent C. Dodds
BIOS SPHERE 2026

The software factory at speed

1,306
merged PRs
91%
from cloud agents
40 min
median, open → merge

Last 30 days. Solo* open-source project: kody-hq/kody

Three pillars make this safe, not just fast.

Lineage

What Kody is

  • A third place for memory, automations, credentials
  • Any agent can use it. No inference.
  • Agents use credentials but never see them

Optional: everything today works without it.

The loop

Build
Verify
Deploy
Outcomes
you want
Signal
ideas · feedback
bugs · friction

Earn the trust to let agents ship

1Good PRs
2Review + verification
3Limit the blast radius

Then the job changes: product + outcomes

Setup and preflight

  1. Clone your repo, open it in your agent
  2. Agent CLI and keys ready, Node 20+
  3. No repo? Fork kentcdodds/mediarss

Caveat: I've only run this on TypeScript so far.

Setup

1
Good PRs

Make every change checkable

Run autopilot

npx kcd-skills@latest autopilot

Your turn

Tell your agent to run, in a repo you own:

npx kcd-skills@latest autopilot
  • No file changes until you approve a plan
  • Kody is optional

The autopilot ladder: 13 rungs

P1 · Good PRs
1Agent map + verify
2Decisions directory
3Primitives catalog
4Self-verification
5PR template
P2 · Review and verification
6Ship loop
7Reviewers + previews
P3 · Blast radius
8Flags + rollback
9Backups
KI · Keep improving
10Friction form
11Triage
12Cleanup issues
13Cleanup cron agents

What autopilot does

  • Audits your repo against the 13 rungs, read only
  • You approve a plan, then merge one setup PR
  • Agents take the top priority, prove it, ship it
  • Product calls and one-way doors wait for you

Your exercise: in a repo you own, tell your agent to run

npx kcd-skills@latest autopilot

AGENTS.md is a router

  • Small: what it is, how to verify, a docs map
  • A static check fails when it grows too big
  • As little instruction as possible

kody-hq/kody · AGENTS.md

Primitives: what exists, where it lives

Entry pointsIdentity + authAssistantRuntimeStorage
Feature flagspackages/worker/src/feature-flags/ Scheduled jobspackages/worker/src/jobs/ Emailpackages/worker/src/email/

Building blocks, not features. Kept short.

kody-hq/kody · primitives.yaml

Decision records

  • Context, decision, consequences
  • Each one says when to revisit it
  • Changed your mind? Mark it superseded

kody-hq/kody · docs/contributing/decisions

Friction becomes static checks

  • As static as possible: types, lint, tests
  • Agents add a rule when something cost them time
  • Only when you can't, bring in an LLM

The PR template is the rubric

Intent
what it's for
Door
one-way or two-way
Cleanup
none, needed, or done
System recap
primitives touched, risk

kody-hq/kody · pull_request_template.md

One-way vs two-way doors

Two-way

Cheap to reverse. Ship it, change it if wrong.

One-way
  • First + last name into one field
  • Public API contracts
  • Deleting user data

Feature flags turn a one-way door into a two-way door.

Lab 1: Kick off autopilot

  1. Tell your agent to run npx kcd-skills@latest autopilot
  2. Check the audit started
  3. Go to lunch. It runs while you eat.

Back in

Questions?

Next: Review + verification

Lab 2: Review what your agent produced

  1. Read the report: scores and evidence
  2. Answer the interview, read the plan
  3. Pick one gap to engineer in Lab 3

Lab 2

2
Review + verification

Earn trust for agent merges

ship-pr: one tick at a time

Ready
→
CI
→
AI review
→
Merge or park
↓
Deploy + health
←
Friction
←
Report
↻ tick until done

Each tick reads where the PR stands. The agent decides.

~9 taps. No error. They left.

  1. Sentry replay
  2. 1:21Agent opens a PR
  3. 1:24CI ✗
  4. 1:50CI ✓
  5. 3 AI reviewers · 8 findings
  6. 2:148 fixes
  7. 2:25Merged by kody-bot
QR code for github.com/kody-hq/kody/pull/3782
kody-hq/kody#3782

It showed its work

Before
Before: the account menu with only person links
After
After: the account menu leading with a Manage section

Agents need a way to see the app

  • One CLI to run and check it locally
  • One skill that teaches it
  • No throwaway scripts

control-kody

Prove it locally
dev · login · request --contains
execute · browse --record
preview --pr (mocks, seeded user)
after deploy: health --sha
QR code for github.com/kody-hq/kody/tree/main/tools
kody-hq/kody
Feature tests prove features.
Health checks prove the running version.
Questions?

Next: Break, then the blast radius

Break

Next: limit the blast radius

3
Limit the blast radius

Make mistakes cheap

Risky changes ship dark

Every flag gets:

Owner
Metric
Removal condition

Rollback: rehearse it, don't discover it

  • Freeze the deploy queue first
  • Roll back the version, or fix forward

A backup you've never restored is a hope

  • Scheduled
  • Restore-tested in isolation
  • Check the data

"If you haven't actually tested it then it's just theater."

Credentials agents use but never see

  • Code runs in Kody; secrets never come back
  • Lock a credential to one package
  • Profiles scope what each agent can reach

Make mistakes cheap

  • Every flag gets an owner, a metric, a removal condition
  • Backups get restore-tested in isolation
  • PocketOS: an agent deleted production in 9 seconds

"If you haven't actually tested it then it's just theater."

Questions?

Next: Loops + the factory

4
Keep improving

Then the job changes

The friction loop

1Every PR files what slowed it down
↓
2An agent fixes it
↓
3Repeated review comments become checks

friction · P1Invite link rows render "Expires [object Object]"

The signal loop

Errors
User feedback
Package errors
→
Gatesignature, rate check
→
Agent triages
→
Bug: agent opens a PR
Product call: options for me

How a product decision happens

1Talk it through, often by voice
2The agent lists open questions, with options
3I pick. Agents fill in the rest.

"Just tell me what you're not confident about."

@kentcdodds/
codebase-cleanup

Cron agents keep the code, tests, and docs lean. Fork mine.

QR code for kody.codes/@kentcdodds/codebase-cleanup

Where Kody MCP fits in the loop

Searchable capabilities
Sandboxed execution
Memory
Verify before handoff

No Kody? The skill still works.

Lab 3: Engineer one gap

Pick one:

Verification checkADR or invariantAI reviewerRisk policyPreview envHealth endpointFriction log
  1. Ship it as one PR
  2. Prove it works

Lab 3

Lab 4: Rerun and compare

  1. Rerun npx kcd-skills@latest autopilot
  2. Compare with this morning's report
  3. Note what moved, and what's next

Lab 4

Show and tell, and close

  1. The gap you closed, and the proof
  2. One surprise from your agent
  3. What's still manual? Hand it to an agent.

Show and tell

Thank you
Kent C. Dodds
@kentcdodds

npx kcd-skills@latest autopilot

QR code for these slides
these slides

Common questions

← Back to the talk

What does this cost?

  • "Maybe $20,000, $25,000 in tokens" so far, maybe more
  • Versus "three teams of engineers, like five to seven engineers each"
  • "It's not cheap." Free tokens are running out, so I steward them.

← All questions

You don't read the code. What about bloat?

  • "Bloat is when there's more code than necessary," not a line count
  • A problem "in so far as it makes it hard for agents to make changes"
  • "Outcomes matter a lot more than output."

← All questions

Who writes the tests?

  • "The agents are writing the tests."
  • A testing-principles doc, with examples
  • Every night, an agent deletes useless assertions from the last 24 hours

← All questions

LLM review or static checks?

  • "A funnel": "as static as possible"
  • "Only when you can't do that do you bring in an LLM"
  • Buy AI reviewers: "they have thought about this problem a lot more than I have"

← All questions

How do agents know which primitives to use?

  • "I did not craft it. I instructed it to be crafted."
  • The PR's system recap grades reuse of existing primitives
  • Combining them takes "a product mind and a vision"

← All questions

ADRs: tickets, stale ones, monorepos

  • "A ticket is... the idea. The ADR is we made this architectural decision and we committed to it."
  • Superseded status sends agents to the current record
  • Many projects in one repo? ADRs per project.

← All questions

Is it secure?

  • Secrets "live in Kody and Kody will never send those secrets back"
  • A locked credential does only "the deterministic thing that your package supports"
  • Webhooks check signatures and rates first: no "denial of wallet"

← All questions

What is Kody, and do I need it?

  • "A modular shared layer that all of your agents have access to... not a harness"
  • "Kody actually does not have any inference." Use any agent.
  • No: "You can make scripts for all this stuff too."

← All questions

How do you prompt and spec?

  • "Talk to the agent like it's a person."
  • Ask: "tell me what you think I told you," or "what would you do if I said go?"
  • "Prompting is really just alignment of ideas."

← All questions

How much do you review? What merges itself?

  • Each repo has a risk policy: ship-pr merges, or parks for me
  • I look at "maybe a quarter" of PRs; big or visual changes wait
  • Small things sometimes go "straight on main"

← All questions

Product work: design, discovery, priorities

  • Agents help with "market research," feature usage, pricing. "Talk to tons of customers."
  • One idea at a time; agents work on many things in parallel
  • "I am the bottleneck on that and I think that should probably remain."

← All questions

Don't you drown in agent output?

  • "I mostly don't read agent's output."
  • I read the conversations, often by voice on a walk
  • "Just tell me what you're not confident about."

← All questions