---
title: "Building an agentic harness that outlasts the model"
description: "Shopify's AppSec team built Dispatch, a Ruby-orchestrated multi-agent harness that partitions codebases, runs parallel category-specific Hunter agents, verifies candidates with tests written by a different model inside each app's existing test suite, and opens draft fix PRs."
url: "https://swe.quest/articles/building-an-agentic-harness-that-outlasts-the-model-75504578038e6cc5"
canonical: "https://shopify.engineering/building-an-agentic-harness-that-outlasts-the-model"
source: "Shopify Engineering"
published: "2026-07-29"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["ai-agents","appsec","vulnerability-research","llms","ruby"]
---

# Building an agentic harness that outlasts the model

A post on [Shopify Engineering](https://swe.quest/sources/shopify.md), published 2026-07-29, 8 min read, Case study. Original: [https://shopify.engineering/building-an-agentic-harness-that-outlasts-the-model](https://shopify.engineering/building-an-agentic-harness-that-outlasts-the-model)

## Summary

Shopify's AppSec team built Dispatch, a Ruby-orchestrated multi-agent harness that partitions codebases, runs parallel category-specific Hunter agents, verifies candidates with tests written by a different model inside each app's existing test suite, and opens draft fix PRs. Across 80+ applications including the Shopify Core Rails monolith it produced 300+ findings in about six weeks, valued at over $400,000 in bounty equivalents. Full scans cost $50–300 and diff-based incremental scans $5–50. Key lessons: tests are the oracle for web vulns (e.g., two-tenant fixtures for IDOR), partitions sized to 20–30% of the context window improve recall at low cost, category-specific agents beat generalists, and deterministic scripts should own structured output, Git and credentials. Newer models find more candidates but also more noise, so the harness matters more than the model.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Application security](https://swe.quest/tags/appsec.md) (Security)
- [Vulnerability research](https://swe.quest/tags/vulnerability-research.md) (Security)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Ruby](https://swe.quest/tags/ruby.md) (Languages)

## Prerequisites

- LLM agents and context windows ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- web vulnerability classes like IDOR
- integration testing ([easy posts on Testing](https://swe.quest/tags/testing.md?difficulty=easy))

## Keywords

Dispatch, Shopify Core, Ruby on Rails, IDOR

## Related posts

- [Cyber Chaos Monkey: Staying ahead of security threats with AI agents](https://swe.quest/articles/cyber-chaos-monkey-staying-ahead-of-security-threats-with-ai-agents-4152f3d289f09c90.md): Shopify Engineering · 2026-11-12 · Medium · 7 min read · AI agents, Vulnerability research, Sandboxing & isolation, Chaos engineering, Kubernetes
  Shopify's Cyber Chaos Monkey (CCM) is an agentic vulnerability hunter that attacks live production infrastructure using test shops, armed with source code, threat intel, past bug reports and deployment records.
- [Building secure mobile apps in the agentic era](https://swe.quest/articles/building-secure-mobile-apps-in-the-agentic-era-7500fbc38f176116.md): Shopify Engineering · 2026-11-18 · Medium · 6 min read · Application security, Mobile, AI agents, Security, LLMs
  Shopify keeps pace with an 11x jump in mobile code output (~434k lines changed per week during a 12-week agent-driven rewrite) by maintaining a per-app attack surface map covering deep links, WebViews, stored data, permissions and dependencies, where every item carries one of five verdicts and a code link.
- [From single pull requests to full software packages: Detecting malicious code at scale](https://swe.quest/articles/from-single-pull-requests-to-full-software-packages-detecting-malicious-code-at-717a58a001a046a1.md): Datadog Engineering · 2026-06-02 · Medium · 12 min read · Supply chain security, Threat detection, AI agents, LLMs, Cost optimization
  Datadog extended BewAIre, its LLM-based malicious code detector, from pull requests to full dependency packages by stacking a cheap filter model in front of an agentic investigation model.
- [The Agents on Rails Files: enter lemans, a Ruby harness for fair agent races](https://swe.quest/articles/the-agents-on-rails-files-enter-lemans-a-ruby-harness-for-fair-agent-races-67f1e215509b634c.md): Evil Martians · 2026-11-03 · Medium · 16 min read · Evaluation, AI agents, Ruby, Sandboxing & isolation, LLMs
  lemans is an open source Ruby harness built for the Rails Foundation's coding-agent benchmark.
- [CWE-bench v2: More coverage, quality, and transparency](https://swe.quest/articles/cwe-bench-v2-more-coverage-quality-and-transparency-a9d3d012216634c0.md): Hugging Face · 2026-11-03 · Medium · 4 min read · Evaluation, Application security, AI agents, LLMs
  CWE-bench v2 releases a public set of 100 agentic security tasks covering 91 CWEs, where an agent must find and fix a vulnerability in a real open-source repository without breaking existing functionality, scored by deterministic programmatic verifiers that reject memorized upstream patches.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
