Chunk sidecars: Inner Loop Validation for AI Coding Agents
Your agent writes code fast, but you shouldn't have to see it until it's right. Chunk sidecars are lightweight microVMs that work inside the agent loop, requiring agents to pass pre-push validation in a CI-like environment before they declare they're "done." That means no massive CI pile-ups, no long round-trips that risk resetting your agent's context. You're sending code you already know is good.
In a controlled comparison, Chunk sidecars delivered feedback in ~22 seconds vs. ~69 seconds waiting on a full CI pipeline run, keeping the fix inside the agent's active context window instead of forcing a reprompt.
In this video, CircleCI's Ryan Hamilton shows you how Chunk sidecars use automated detection to recreate your build system, complete with your test commands and dependencies. When your agent (Claude Code, Cursor, Codex, or any other) syncs code to the sidecar, a microbuild kicks off, runs a scoped set of checks, and returns failure information directly to the agent. Then the environment tears completely down.
The VM itself is snapshotted, so subsequent microbuilds start in milliseconds. Quality should never come at the expense of velocity, or vice versa.
Get started in just a few easy steps:
You’ll need a CircleCI account: circleci.com/sign-up
After that, there are just 3 easy steps:
- Install the CLI (https://github.com/CircleCI-Public/chunk-cli)
- Step 1: brew install CircleCI-Public/circleci/chunk
- Step 2: Initialize and authenticate → chunk init → chunk auth set circleci
- Run the set-up command
- Your agent automatically runs a microbuild when the stop hook goes.
Helpful resources:
Install and configure the Chunk CLI: https://circle.ci/4vWh7oP
How to use the Chunk CLI: https://circle.ci/4uKpliS
Validate in a Chunk sidecar: https://circle.ci/4vY5XQq
Manage Chunk sidecars: https://circle.ci/4uGfD13
Snapshot a Chunk sidecar: https://circle.ci/43M9jKl
Chunk overview and setup (the web app Chunk, distinct from the CLI): https://circle.ci/4fUFE90
Chunk sidecars launch blog post: https://circle.ci/4oGZ6bQ
–
0:00 - Introduction to Chunk sidecars
0:25 The Inner and Outer Loops of Software Delivery
1:11 The Impact of AI Agents on the Delivery Balance
1:40 Why Chunk sidecars Belong in the Inner Loop
2:10 Defining Chunk sidecars and Microbuilds
3:05 Performance Study: Chunk sidecar vs. CI Pipeline Feedback
3:41 Agent Agnostic Tooling
4:05 Installation and Prerequisites (Homebrew and macOS)
4:57 Initializing Configuration and Finding Your Org ID
5:35 Authenticating with CircleCI API Tokens
6:33 Verifying Auth Status and Configuration Files
7:29 Live Demo: Validating a Broken Test in a Pull Request
8:20 -Using Claude Code with Chunk Validate
9:53 Agent Fixing Code Based on Sidecar Feedback
10:34 Final Green Signal and Pushing to Production CI
11:48 Successful CI Pipeline Results
12:22 Conclusion and Final Summary