February 11, 2026
By John Daskovsky, Senior Engineering Manager, Product Experiences

Introducing Nightshift: A Batch Processing Framework for AI Agents

Most teams have repetitive, high-volume tasks that eat up their week: migrating components, generating tests, auditing content. Nightshift is a batch processing framework that delegates that work to specialized AI agents, self-improving its instructions with every item it completes.

I recently found myself staring at a spreadsheet of 150 UI components.

I’m working on a massive migration for a client, moving a legacy CMS over to WordPress VIP. Each component from the old site needs to be rebuilt, styled, and tested to ensure that functionality is maintained. We only had a couple weeks to get this part of the work complete, but we were on pace to get it done in months.

I knew I needed to automate as much of the process as possible, but as I started pushing my usual AI tools to handle the volume, I watched them hit a ceiling. They weren't just slow, they performed worse and worse over time. To solve the problem, I built Nightshift.

The Problem: Context Bloat

AI agents suffer from a phenomenon called context accumulation. Most agents operate within a single, continuous conversation. As the session history grows, every previous instruction, correction, and minor mistake is added to the agent's "working memory" or context window.

After ten or twenty items, the agent isn't just focusing on the current task; it's dragging around the weight of everything that came before it. This "bloat" makes the agent progressively slower, more expensive, and increasingly prone to hallucinations.

But shouldn’t it be just the opposite? Shouldn’t the agent learn from previous iterations and get faster and more reliable?

Enter Nightshift

Nightshift is a batch processing framework that treats long-running work as a "shift." It breaks the work into discrete items (rows in a CSV) and delegates them to three specialized sub-agents with strict role separation:

  1. The Manager: The orchestrator. It reads the queue, delegates tasks, and tracks state.

  2. The Dev Agent: The worker. It executes the steps for a single item, self-validates, and refines the instructions as it goes.

  3. The QA Agent: The skeptic. It independently verifies the results against strict validation criteria. It’s read-only, ensuring no "grading its own homework."

Why is this different than a Ralph Loop?

If you follow the agentic coding space, you’ve likely heard of the Ralph Loop (the "persistently trying" pattern named after Ralph Wiggum).

While Nightshift shares the "fresh context" philosophy of a Ralph Loop, it differs in a few key ways:

  • Vertical vs. Horizontal: A Ralph Loop is typically designed for vertical depth: iterating on a single, complex task (like "Build this whole feature") until it passes a test. Nightshift is built for horizontal scale: designed to handle hundreds of different instances of a task across a wide queue.

  • Known vs. Unknown: A Ralph Loop is often used when the approach itself is uncertain; the agent is figuring out *how* to solve the problem as it goes. Nightshift assumes the task is well-defined and repeatable; the goal is to execute it reliably at scale and refine the process along the way.

  • Role Separation: Instead of one agent looping on itself, Nightshift uses a multi-agent "checks and balances" system. By separating the Manager, Dev, and QA roles, you get much higher reliability across items and the ability for work to happen in parallel.

The Learning Loop: Self-Improving Instructions

The most powerful feature of Nightshift is that the Dev agent self-improves its own step definitions.

When the Dev agent processes an item, it substitutes variables (like {component_name}) into a task template. If it encounters a minor hurdle or finds a more efficient way to navigate the UI, it updates the "Steps" section of the task file.

This means the system actually gets faster and more reliable as it moves through the queue. By item #50, the instructions are battle-hardened by the edge cases found in the first 49.

Parallel Execution and Scaling

Because each item is an independent invocation with fresh context, the Manager can delegate multiple items to Dev agents simultaneously. You control the batch size to balance speed against reliability: a batch of 5 might be right for complex migrations, while simpler tasks can safely run 10 or more in parallel. This lets you tune throughput without sacrificing quality.

The Manager also maintains the full state of the shift, tracking every item through a state machine (todo -> in_progress -> qa -> done). Because that state is persisted, you can stop a shift at any point and pick it back up later exactly where you left off. No lost progress, no re-running completed items.

Use Cases

Nightshift isn’t just for CMS migrations. It’s for any repetitive engineering task that requires high-fidelity results:

  • Mass Component Migration: Converting 100+ components from one framework to another (e.g., Vue to React).

  • Unit Test Generation: Systematically writing tests for every file in a legacy directory.

  • Documentation Audits: Running a QA check against every page of a site to ensure SEO metadata matches the content.

  • Data Transformation: Processing a spreadsheet of API endpoints and generating scaffolded code for each one.

If you have a project with a long tail of repetitive tasks that are currently eating your week, give Nightshift a look. Or, if you’ve got an idea for a "shift" we should run, let us know!