← все видео

Anthropic Workshop: Build Agents That Run for Hours — Ash Prabaker & Andrew Wilson

AI Engineer · 2026-05-18 · 1ч 15м · 87 832 просмотров · YouTube ↗

Топики: durable-execution, ai-agent-orchestration

🎧 Аудио

📝 Summary

model=deepseek-v4-flash · prompt=summary-v7 · 16 898→7 025 tokens · 2026-07-20 13:40:51

🎯 Главная суть

Инженеры Anthropic Эш Прабейкер и Эндрю Уилсон представили эволюцию и практические подходы к построению агентов, способных непрерывно работать 5–6 часов и более, решая комплексные задачи вроде создания полноценных веб-приложений. Ключевая идея: прогресс достигается не только через улучшение самих моделей (от 1 часа стабильной работы у Sonnet 3.7 до 12 часов у Opus 4.6 при минимальной обвязке), но и через козволюцию обвязки (harness) — по мере того как модели учатся лучше планировать, оценивать и управлять контекстом, обвязка упрощается и адаптируется. Основной паттерн для длительных сессий — разделение ролей: планировщик (PM), генератор (разработчик) и оценщик (QA), которые работают в отдельных контекстных окнах и взаимодействуют через файловую систему, а критика строится на детальных рубриках и живом тестировании через Playwright.

Историческая эволюция: от 20 минут до суток

За год Claude Code прошёл путь от сессий длительностью около 20 минут до возможности работать днями. Эндрю проиллюстрировал это на шкале: с Sonnet 3.7 (февраль 2025) минимальная обвязка давала 1 час непрерывной работы; Opus 3.5 — около 4 часов; Opus 4.6 — уже 12 часов. Однако реальные сценарии (например, построение полноценного приложения «с нуля» с нуля) занимают 3–5 часов при текущих моделях. Ключевые вехи: выпуск Sonnet 3.5 с артефактами (первая демонстрация итеративного кодинга), внедрение Computer Use и MCP-спецификации, релиз Claude Code в феврале 2025 как исследовательского превью для сбора данных о том, как разработчики используют ИИ, а затем его GA вместе с Agent SDK. С каждым новым релизом модели Anthropic одновременно выпускала изменения в обвязке — они развиваются вместе, а не по отдельности.

Три основные проблемы длительных сессий

Эндрю выделил три группы проблем, мешающих агентам работать часами. Первая — контекст: окно конечно, модель страдает «амнезией» при старте, а по мере заполнения контекста возникает «контекстная гниль» — снижение когерентности; к тому же модель может испытывать «контекстную тревогу» под конец окна и спешить завершить задачу. Вторая — планирование: модели из коробки плохо планируют, пытаются сделать всё за один проход или бросают половину функционала. Третья, менее очевидная: модели плохо оценивают собственный вывод — могут считать наполовину сделанную фичу «готовой» (сикофантия проявляется и в кодинге), или построить фронтенд-кнопку без бэкенда, выглядящую завершённой.

Два рычага: модель и обвязка

Проблемы решаются двумя путями. Первый — встраивание исправлений в веса самой модели (тогда растёт базовое время работы). Второй — изменение обвязки (harness), т.е. каркаса вокруг модели. Agent SDK поставляет примитивы: основной цикл агента, где Claude определяет действия и инструменты, может использовать MCP-серверы, делегировать подзадачи, загружать контекст из Claude.md или скиллов, а также включает систему разрешений. Из этих примитивов собирается собственная обвязка для конкретной задачи. Anthropic замечает, что в каждом релизе они выпускали улучшения и модели, и обвязки одновременно — это козволюция.

Ralph Wiggum Loop и его эволюция

Техника Ralph Loop (опубликована Джеффри Хантли в июле 2025) приобрела популярность к декабрю. Суть: простой промпт передаётся в Claude Code CLI, который запускается в цикле до завершения всех задач. На деле есть несколько фаз: сначала планирование (разбивка промпта на фичи), затем каждый таск выполняется в свежем контекстном окне. Ключевой принцип — «лучше предсказуемо ошибаться, чем непредсказуемо достигать цели» (fail predictably in an unpredictable world). Anthropic создала собственный плагин Ralph Loop в Claude Code, но он работает в рамках одной сессии с компактизацией, а не с новыми окнами — поэтому некоторые не считают его «настоящим» Ralph Loop. Плагин использует максимальное количество итераций и «стоп-слово» — когда Claude обычно останавливается, хук перехватывает завершение и продолжает, если задача не выполнена.

Улучшения контекста: компактизация, скиллы, программный вызов инструментов

С выходом Sonnet 4.5 модель стала лучше отслеживать потребление токенов и управлять собственным контекстом. Claude Code 2.0 добавил чекпоинты (возможность отката к предыдущему состоянию). Скиллы реализуют «прогрессивное раскрытие»: сначала загружается только фронтматер скилла, а не все описания инструментов, и полный контент подгружается только при активации. Программный вызов инструментов (programmatic tool calling) позволяет модели писать код, который выполняет серию вызовов инструментов, и получать только итоговый результат — это сокращает объём данных в контексте. Серверная компактизация (server‑side compaction) появилась с Opus 4.6 — теперь модели могут работать практически бесконечно в одной сессии, без необходимости пересоздавать окна.

Первая версия длительной обвязки: инициализатор, артефакты, цикл

В первой публикации Anthropic о длительных агентах (ноябрь 2025) была описана обвязка: инициализатор принимает нечёткий промпт («создай Slack-клон») и разбивает его на постоянные артефакты — feature_list.json (модели реже перезаписывают JSON, чем markdown), progress.json, git-репозиторий, init-скрипт и флаги статуса фич. Затем запускается цикл в свежих контекстных окнах: получение текущего состояния (текущая директория, progress-файл), smoke-тест или запуск init-скрипта, выбор одной непройденной фичи, её реализация, тестирование (например, через Puppeteer), и если тесты пройдены — git-commit и отметка о завершении фичи. Такой подход сочетал свежие контексты, постоянные артефакты, верификацию и планирование.

GAN-стиль: генератор и оценщик

Эш представил паттерн, вдохновлённый генеративно-состязательными сетями (GAN). Есть два агента: генератор (строит код) и оценщик (ставит оценки). Оценщик не просто читает diff'ы, а использует Playwright, чтобы открыть живые страницы, кликать, проверять — так он получает объективную картину. Затем критика передаётся генератору, и цикл повторяется. Контраст с типичным подходом «скажи модели проверь свою работу»: модель-генератор склонна к сикофантии и «штампует» свою работу как готовую, а отдельный критик, настроенный на строгость, может быть объективным. Настроить строгого критика гораздо проще, чем заставить генератора быть самокритичным — это аналогично человеческому опыту: легко критиковать чужую работу, сложно свою.

Рубрики для оценки вкуса и качества

Для оценки фронтенда Anthropic разработала рубрику из четырёх критериев: дизайн, оригинальность, мастерство (craft), функциональность. Веса смещены в сторону дизайна и оригинальности, так как модели Opus 4.6 уже хорошо справляются с функциональностью. Цель — избежать «AI slop» (пурпурные градиенты, шаблонная эстетика). Рубрика калибруется на нескольких эталонных сайтах, чтобы вкус оценщика сходился со вкусом разработчиков. Эш подчеркнул: «вы не можете оценить вкус? можете, если у вас есть достаточно сильное мнение и вы его запишете».

Контракты между генератором и оценщиком

Перед началом реализации генератор и оценщик договариваются, что именно означает «сделано» для текущей фичи. Генератор предлагает: «Я построю фичу X, проверь тестом Y». Оценщик может возразить: «объём слишком велик, тесты слабые, пропущен кейс Z». Они обмениваются файлами на диске (один пишет markdown, другой читает) до полного согласия. Только после этого начинается реализация. Оценщик затем проверяет результат против этого контракта, а не против первоначального спецификаций планировщика. Такой подход превращает пользовательские истории в проверяемые, осязаемые утверждения без чрезмерной детализации на старте. Для демо-приложения Retroforge генератор и оценщик выработали 27 пунктов контракта — уровень детализации, при котором критика становится действенной.

Пример: без обвязки vs с обвязкой

При промпте «построй ретро-игровой редактор» без GAN-обвязки (один агент в одном контексте) получился интерфейс, который выглядел нормально (спрайтовый редактор, палитра, таймлайн), но в play mode персонаж не двигался по нажатию стрелок — игра была нерабочей. С обвязкой (стоимость ~$200, 6 часов работы) результат был радикально другим: приложение само назвалось Retroforge, имело диалог нового проекта, 54-цветную палитру, AI-ассистента внутри редактора, рабочий play mode с физическим движком, коллизиями, отладкой. Ключевое отличие: агенты могли «перезапускать» подзадачи с нуля, если застревали на одном критерии (например, оригинальности), вместо того чтобы патчить существующий код. Это поведение — «выбросить всё и начать заново» — никогда не наблюдалось у одного генератора, который сам оценивает свою работу.

Эволюция обвязки при улучшении моделей

По мере выхода Opus 4.6 некоторые элементы обвязки стали избыточными. Например, контекстный сброс между сессиями перестал требоваться — компактизация в одной сессии работает стабильно. Спринтовая декомпозиция (выдача фич по одной) теперь не обязательна — модель удерживает связную двухчасовую сборку. Частота запуска оценщика снизилась: можно запускать разово в конце большой генерации. Принцип: обвязка не исчезает, а упрощается — то, что было необходимо для Opus 4.5, устарело для Opus 4.6, и это нормальный процесс козволюции.

Использование файловой системы как разделяемого состояния

Для длительных агентов эффективно хранить состояние не в контексте, а на диске. Эш рекомендует класть «хлебные крошки» (learnings, логи попыток, текущее состояние) в JSON и doc-файлы, чтобы другой агент или человек могли подхватить задачу. Например, файлы типа «пробовал X, оценщик нашёл баг Y, исправление Z применено, работает — да, продолжать». Такой подход позволяет гибридный workflow: запустить обвязку на несколько часов, потом вручную доработать в Claude Code результаты.

Рекомендации для практиков

Пять принципов для построения длительных агентов: (1) самостоятельная оценка — ловушка, используйте состязательного оценщика; (2) компактизация ≠ когерентность — сжатые саммари страдают от потери сути, предпочтительнее структурированные handoff'ы и чистые контексты; (3) субъективное качество (дизайн, вкус) измеримо — запишите свою рубрику; (4) читайте трассы вручную — только так можно понять, где модель отклоняется, и подправить промпты; (5) обвязка должна упрощаться по мере улучшения модели — будьте готовы удалять то, что стало не нужно.

Agent Teams и генератор-оценщик

Agent Teams — это общий механизм в Claude Code для построения кастомных агентов, где подчинённые могут общаться друг с другом и координироваться, а не только отчитываться главному агенту. Паттерн генератор-оценщик — это частный случай такого командного подхода: можно представить фронтенд-агента со своим критиком, бэкенд-агента со своим, и интегратора между ними. Однако для длительных зелёных проектов (6+ часов) Claude Code пока не имеет встроенного примитива — обвязка строится через Agent SDK на удалённом сервере. Но Agent Teams — подходящая среда для экспериментов: можно сделать генератора главным агентом, а оценщика — членом команды.

Работа с Brownfield и долгоживущими продуктами

Для доработки существующих кодовых баз через несколько дней/недель после первичной генерации Эш рекомендует оставлять артефакты: логи всех попыток, фиксов и их результатов, а также «живые» doc-файлы с высокоуровневой структурой. Тогда другой агент или человек может grep’нуть эти файлы и продолжить. Рубрики для оценки нужно адаптировать под конкретный проект (технологический стек, архитектурные паттерны). Для brownfield часто автоматизируют полный цикл разработки: мониторинг → автоматический тикет → агент делает PR → ревью → мёрж.

Чтение трасс как ключевой навык

При разработке обвязки Эш и команда Anthropic много времени тратят на ручное чтение полных трасс модели. Они не просто смотрят на ошибки, а сопереживают модели: «закройте глаза и попробуйте навигацию по веб-странице, открывая глаза каждые 10 секунд». Только так можно понять, почему модель приняла то или иное решение, и скорректировать промпты. Этот процесс схож с чтением стек-трейса. При массовом запуске (10 параллельных генераций) 3 успешны, 7 проваливаются — затем разработчики разбирают провалы, корректируют промпты обвязки и повторяют. Никакого готового «секретного ингредиента» нет — только итеративное улучшение.Вот содержательный пересказ видео, разбитый на тематические разделы. Все ключевые факты, цифры, имена и причинно-следственные связи сохранены, вода удалена.


🎯 Главная суть

Инженеры Anthropic Эш Прабейкер и Эндрю Уилсон изложили эволюцию и практические приёмы построения агентов, способных непрерывно работать 5–6 часов и более над задачами вроде создания полноценных веб-приложений. Прогресс достигается козволюцией модели и обвязки (harness): версия за версией модели учатся лучше планировать и оценивать свой вывод, а обвязка упрощается и адаптируется. Ключевой паттерн — разделение ролей: планировщик, генератор и оценщик работают в отдельных контекстных окнах и взаимодействуют через файловую систему, а оценка строится на детальных рубриках и живом тестировании (через Playwright).

Эволюция: от 20 минут до суток

За год с момента выхода Sonnet 3.7 и Claude Code максимальное время стабильной работы агента при минимальной обвязке выросло с 1 часа до 12 часов у Opus 4.6 (данные из метрики «сколько агент может работать, выполняя 50% задач»). В реальных проектах (например, создание полноценного приложения с нуля) типичное время сборки — 3–5 часов. Ключевые вехи: артефакты в Sonnet 3.5 (итеративное улучшение кода), Computer Use и MCP-спецификация, Claude Code в феврале 2025 как исследовательское превью (цель — собрать данные для улучшения базовой модели), затем GA и переименование Claude Code SDK в Agent SDK.

Три фундаментальные проблемы длительных сессий

  1. Контекст: окно конечно, модель страдает «амнезией» при старте; по мере заполнения возникает «контекстная гниль» — снижение когерентности; под конец окна модель может испытывать «тревогу» и спешить завершить задачу.
  2. Планирование: модели из коробки плохо планируют — пытаются сделать всё за один проход, оставляют половину функционала нереализованным.
  3. Оценка собственного вывода: модель склонна к сикофантии — считает наполовину сделанную фичу «готовой»; может построить кнопку с фронтендом, но без бэкенда, и считать задачу выполненной.

Два рычага: модель и обвязка

Проблемы решаются двумя путями: улучшением модели (встраивание решений в веса) и изменением обвязки (scaffolding вокруг модели). Agent SDK поставляет примитивы: основной цикл агента, MCP-инструменты, подчинённые агенты, загрузка контекста из Claude.md и скиллов, система разрешений. Из этих примитивов собирается специфическая обвязка для каждой задачи. Anthropic подчёркивает, что модель и обвязка развиваются совместно — с каждым релизом они выпускали улучшения одновременно.

Ralph Wiggum Loop и его эволюция

Техника, опубликованная Джеффри Хантли в июле 2025 и получившая массовое распространение к декабрю. Суть: промпт передаётся в Claude Code CLI, который запускается в цикле до завершения всех задач. Есть фазы: планирование (разбивка промпта на фичи), затем каждая фича выполняется в свежем контекстном окне. Принцип — «лучше предсказуемо ошибаться, чем непредсказуемо достигать цели». Anthropic создала собственную версию Ralph Loop в Claude Code, но она работает в рамках одного сеанса с компактизацией, а не с новыми окнами — поэтому некоторые не считают её «настоящим» Ralph Loop. Используется максимальное число итераций и «стоп-слово» — когда Claude обычно останавливается, хук перехватывает завершение и продолжает, если задача не выполнена.

Улучшения контекста: компактизация, скиллы, программный вызов инструментов

Sonnet 4.5 научилась отслеживать потребление токенов и лучше управлять контекстом. Claude Code 2.0 добавил чекпоинты. Скиллы используют «прогрессивное раскрытие»: загружается только фронтматер, полный контент — при активации. Программный вызов инструментов позволяет модели писать код, который выполняет серию вызовов, и получать только итоговый результат — это сокращает объём данных в контексте. Серверная компактизация (Opus 4.6) дала возможность работать в одной сессии практически бесконечно, без пересоздания окон.

Первая версия длительной обвязки: инициализатор, артефакты, цикл

В ноябрьской публикации Anthropic описана обвязка: инициализатор принимает нечёткий промпт («создай Slack-клон») и разбивает его на постоянные артефакты: feature_list.json (модели реже перезаписывают JSON, чем markdown), progress.json, git-репозиторий, init-скрипт и флаги готовности фич. Затем цикл в свежих контекстных окнах: получение текущего состояния, smoke-тест (запуск init-скрипта), выбор одной непройденной фичи, реализация, тестирование (через Puppeteer), git-commit и отметка о выполнении. Такой подход сочетал свежие контексты, постоянные артефакты, верификацию и планирование.

GAN-стиль: генератор и оценщик

Паттерн, вдохновлённый генеративно-состязательными сетями. Два агента: генератор (строит код) и оценщик — который не просто читает diff'ы, а использует Playwright для открытия живых страниц, кликов и проверок. Оценщик возвращает критику генератору, цикл повторяется. Причина: модель-генератор склонна «штамповать» свою работу как готовую; отдельный критик, настроенный на строгость, может быть объективным. Настроить строгого критика гораздо проще, чем заставить генератора быть самокритичным — аналог человеческого опыта (легко критиковать чужую работу, сложно свою).

Рубрики для оценки вкуса и качества

Для фронтенда Anthropic использует рубрику из четырёх критериев: дизайн, оригинальность, мастерство, функциональность. Веса смещены в сторону дизайна и оригинальности, так как Opus 4.6 уже хорошо справляется с функциональностью. Цель — избежать «AI slop» (пурпурные градиенты, шаблонная эстетика). Рубрика калибруется на нескольких эталонных сайтах, чтобы вкус оценщика совпадал со вкусом разработчиков. Эш: «вы не можете оценить вкус? можете, если у вас есть достаточно сильное мнение и вы его запишете».

Контракты между генератором и оценщиком

Перед началом реализации генератор и оценщик договариваются, что значит «сделано» для фичи. Генератор предлагает объём и тесты, оценщик возражает (объём слишком велик, тесты слабы, пропущен кейс). Они обмениваются файлами на диске до полного согласия. Только после этого начинается реализация, и оценщик проверяет результат против этого контракта, а не против первоначального спецификаций планировщика. Для демо-приложения Retroforge было выработано 27 пунктов контракта — уровень детализации, при котором критика становится действенной.

Пример: без обвязки vs с обвязкой

При промпте «построй ретро-игровой редактор» без GAN-обвязки (один агент в одном контексте) интерфейс выглядел нормально, но в play mode персонаж не реагировал на нажатия — игра была нерабочей. С обвязкой (стоимость ~$200, 6 часов работы) результат был радикально другим: приложение само назвалось Retroforge, имело диалог нового проекта, 54-цветную палитру, AI-ассистента внутри редактора, рабочий play mode с коллизиями и отладкой. Ключевое отличие: агенты могли «выбросить всё и начать заново», если застревали на одном критерии (например, оригинальности), вместо того чтобы патчить существующий код. Это поведение никогда не наблюдалось у одного генератора, который сам оценивает свою работу.

Эволюция обвязки при улучшении моделей

С Opus 4.6 некоторые элементы обвязки стали избыточны: контекстный сброс между сессиями больше не требуется (компактизация работает стабильно), спринтовая декомпозиция не обязательна (модель удерживает связную двухчасовую сборку), частота запуска оценщика снизилась. Принцип: обвязка не исчезает, а упрощается — то, что было необходимо для Opus 4.5, устарело для Opus 4.6.

Использование файловой системы как разделяемого состояния

Для длительных агентов эффективно хранить состояние не в контексте, а на диске. Эш рекомендует оставлять «хлебные крошки» (логи попыток, фиксов, результатов) в JSON и doc-файлах, чтобы другой агент или человек могли подхватить задачу. Это позволяет гибридный workflow: запустить обвязку на несколько часов, потом доработать результаты в Claude Code.

Рекомендации для практиков (5 пунктов)

  1. Самостоятельная оценка — ловушка, используйте состязательного оценщика.
  2. Компактизация ≠ когерентность — сжатые саммари страдают от потери сути; структурированные handoff'ы и чистые контексты эффективнее.
  3. Субъективное качество (дизайн, вкус) измеримо — запишите свою рубрику.
  4. Читайте трассы вручную — только так можно понять, где модель отклоняется, и подправить промпты.
  5. Обвязка должна упрощаться по мере улучшения модели — удаляйте то, что стало не нужно.

Agent Teams и генератор-оценщик

Agent Teams — механизм в Claude Code, где подчинённые агенты могут общаться друг с другом, а не только с главным агентом. Паттерн генератор-оценщик — частный случай такого командного подхода: можно назначить генератора главным агентом, а оценщика — членом команды. Для длительных зелёных проектов (6+ часов) Claude Code пока не имеет встроенного примитива, обвязка строится через Agent SDK на удалённом сервере.

Работа с Brownfield и долгоживущими продуктами

Для доработки существующих кодовых баз через дни/недели после первичной генерации нужно оставлять артефакты: логи всех попыток и фиксов, а также «живые» doc-файлы с высокоуровневой структурой. Эти файлы позволяют другому агенту или человеку grep’нуть и продолжить. Рубрики для оценки нужно адаптировать под конкретный проект (технологический стек, архитектурные паттерны). Для brownfield автоматизируют полный цикл разработки: мониторинг → тикет → агент делает PR → ревью → мёрж.

Чтение трасс как ключевой навык

При разработке обвязки команда Anthropic много времени тратит на ручное чтение полных трасс модели. Они сопереживают модели: «закройте глаза и попробуйте навигацию по веб-странице, открывая глаза каждые 10 секунд». Только так можно понять, почему модель приняла то или иное решение, и скорректировать промпты. При массовом запуске (10 параллельных генераций) 3 успешны, 7 проваливаются — затем разработчики разбирают провалы, корректируют промпты обвязки и повторяют. Никакого готового секрета нет — только итеративное улучшение.

📜 Transcript

en · 12 610 слов · 166 сегментов · clean

Показать текст транскрипта
Nice to meet you guys. I'm Ash, this is Andrew. We both work as engineers in our applied AI team here at Anthropic. And the kind of topic for this session was inspired by a blog post we put out just a couple of weeks ago actually about how to think about building agents that can actually run for really long extended period of time, you know, we're talking five, six hour plus kind of runs. I think we've all seen these kind of demos, you know, of like companies being like, hey, we've like one-shotted a browser, for example, but not necessarily sharing like some of the details into what goes into the harness, and that's what we kind of want to talk about today. So the first off, my amazing colleague, Andrew, will talk about a little bit about basically how we've got here, some of the primitives that we've shipped in code code. and where we are today. And then I'll hop back on stage to talk a little bit about some of the more experimental stuff that we're playing with, harnesses, as well as a few examples of what we've seen. Over to you. Sounds good. Thank you, Ash. And yeah, thanks everyone for joining our first session of the AI Engineer Conference. So glad you're spending it with us. My name is Andrew. I'm on the Applied AI team based out of London working as a solution architect with a lot of our digital native and industries customers. So yeah, I'm going to give a little bit of a history tour, trip down memory lane, but really with the focus on all the things that we've shipped that lead to agents being able to run for multiple hours or even days at a time. And then I'll hand over to Ash to do more of the state of the art. Right, okay, so a little quote from, on Twitter from Boris, the creator of Cloud Code. This was on the one year anniversary of Cloud Code. Basically saying a year ago, Cloud was struggling just to write bash commands and escaping strings. And it could run for maybe 20 minutes at a time. And then we're now at the point where almost all of Cloud Code is being written by Cloud Code and it can run effectively for days at a time. So sort of a big. big swing over just the course of a year and I'll walk through that history a little bit now but just to zoom in here just to sort of frame the problem up like why why is it that it's really difficult for these agents to run for extended periods of time I think broadly there's three big buckets. Some are more intuitive than others. So firstly, context. I think we all understand context window is very much finite. So you start a new session, there's like amnesia. The agent has to start from scratch, so you need some sort of memory components. Also, as you're working through a context window, there's this notion of context rot, so there's less coherence as you're getting deeper into that session. Also, you might get to the point where the model actually exhibits what's called context-sense anxiety. So it gets kind of nervous as it reaches the end of its context window and it just quickly hurries up to finish what it's doing. This kind of leads into planning. In general, models are not that great at planning, just out of the box. They might try and do everything in just one shot, or for example, they might build half a feature and then stop, or they might just run out of context altogether and sort of leave a half-finished app built. But then maybe less intuitively, Models are really bad at judging their own output. So I know we all know that models can be sycophantic and sort of tell you what you want to hear, but this applies as well to coding tasks. So it might look at a feature and see that it's sort of half baked or a little bit implemented and say, yeah, okay, that looks done and then we'll move on to the next thing. Or it might build a feature like a button, but actually the backend doesn't exist for it. There's sort of nothing behind that, but it looks like the feature is done. So I know Ash will talk. quite extensively of some of the new techniques we have to help with this specifically so models can become better at judging their own output. So there's. There's two ways really we can fix these things. The first one is obviously the model. So baking it all into the model weights themselves. And I'm sure you've all seen this meter chart. It's basically how long can an agent run for with a minimal scaffold where it's completing 50% of the tasks. And you'll see from Opus 3.7, it's around one hour. and up to Opus 4.6, one year later, it's at 12 hours, so an entire day. And we've of course, you know, managed to get that running much longer, other people have as well, but this is just a sort of very minimal scaffold. The second thing that you can do is, of course, make changes to the harness itself. So this is the scaffolding around the model. We have the agent SDK, which ships with all the primitives that we've been building over time. So there's the core agent loop itself, where you have Claude model that's determining what to do, what tools to run. Maybe it's pulling in some tools from MCP servers. It might delegate some tasks to a sub-agent. It's bringing in all the context from things like Claude.md or the skills that are loaded or slash commands. There's a whole permission system. And this will change over time as well as the models get better. improve, but these are sort of the core primitives that we're working with, and then of course you use this framework to build your own harness for whatever it is you're trying to do, such as some of the things that Ash will show later on when we get into more long-running agents. I think what's also interesting is just looking back at the last year of releases is that when we've released a model, we've also released a lot of harness changes alongside the models. So really these things are co-evolving together. So we'll just look back. I suppose firstly, just prehistory beyond one year ago. I think we all remember that period where Claude had the artifact section of Claude.ai and Sonnet 3.5 was the first model that really showed promise when it came to coding. And it can now verify that, it could look at what it had built and sort of iterate from there. And that was quite an aha moment, sort of pre-Claude code. But then also we shipped computer use, so it could start clicking around, taking screenshots. testing its own code, as well as MCP spec, which enabled it to use tools. So then getting into Claude code. This is February 2025. So this is about just over a year ago. Sonnet 3.7 was released and sort of state of the art on Sweebench and Claude code was released in research preview. And I think an interesting quote that I pulled from this release actually is that the goal of Claude code was to better understand how developers use Claude for coding to inform future model improvements. So essentially when we released Claude code the whole idea was for it to be somewhat experimental to inform how we actually improve the base model itself. And you'll see this trend that over time the models become better, the harness, certain aspects of it might become less necessary or it will evolve. Just in terms of these slides as well, in the bottom left corner, these are some of the things that are sort of the focus of these releases, whether it's context or planning or verification and then some stats, but I'm not gonna sort of read everything. So yeah, next, this was around May time of last year. Opus 4 and Sonnet 4 were released. And just in general, these tools got much better at managing their own context and getting to task completion without reward hacking or anything like that. And then Cloud Code became GA as well, and we released the Cloud Code SDK, so sort of the harness powering Cloud Code. A little interlude here from the timeline. I think everybody now knows about this Ralph Wiggum technique. You might not know that it was actually last July that this was, that this came out when, when Geoffrey Huntley. initially released the paper because it really sort of gained a lot of traction around say December or so of last year when for example people started playing around with it themselves Claude also released our own uh RELF loop within the the Claude code uh harness itself but essentially it's quite sort of a simple technique that you're just taking a prompt and you're feeding it into Claude code CLI for example and then you're just running that on a loop until all the tasks are complete. It's a little bit deeper than that. I think people tend to simplify it. There's actually a few phases where at first, you know, would have some kind of planning where it breaks down that prompt into a few different features and then it would pick sort of one task from that and start a new session and then work with a fresh context window. So a lot of those concepts were applied in the RELF loop, but I think why it caught so much attention is because it sort of seemed really simplistic and he put it. uh, deterministically bad in an undeterministic world. So the idea being that it's better to fail predictably than it is to succeed unpredictably. Um, when we actually created our own plugin for this in Cloud Code, you'll see- Well, I don't know if people can recognize what the major difference is. There's some people say, you know, that's not a real Ralph loop. The idea is that this is just running within a single Cloud Code session. So it's not creating a fresh context window. It's just relying on compaction to happen over time. So, you know, maybe it's not considered sort of a real Ralph loop, but you'd set the max iterations, you'd set a safe word, and then essentially a stop hook would intercept when Cloud would typically stop. And if it's not finished, it would just sort of continue until it hits. It's one of those exit criteria. Okay, so on to Sonnet 4.5. This was when the model just generally started getting better again at handling its own context. So this is when it became more context aware, tracking how many tokens had been consumed. So as it got towards the end of the context window, it sort of understand that and it could manage its own context. Cloud code 2.0 also shipped. This is where we introduced checkpoints. So actually keeping track of the code over time, being able to rewind to previous parts of the session. And then we released, we just sort of renamed the cloud code SDK to the agent SDK. And that's because we realized it's much more general purpose than actually just for coding. So you'll see we're talking about coding a lot right now, but I think what's very interesting is applying these long running harnesses to other domains as well. At this point, we could run for about 30 hours or so with Claude Sonnet 4.5. But then, completing the family with Haiku 4.5 and Opus 4.5, this is where it got really interesting because all of a sudden, running... many sub-agents became really economical. And Opus 4.5 became really good at planning. So we could start doing things like using Opus 4.5 for planning, and then using Sonnet 4.5 as the workhorse for really executing all of that code. And then there's a big couple months as well because this is when we release skills, which again, very good at making effective use of the context with this notion of progressive disclosure, so just the front matter of the skill is loaded in instead of sort of all of your tool descriptions, you know, which can consume quite a lot of the context window up front. And then sort of the entire rest of the body of the skill is loaded in if it's instantiated, followed by say some references to even code that could run more deterministically. And then more context improvements, things like programmatic tool calling. So instead of running a bunch of tools, pulling all of that into context and then trying to process it, actually just writing code on the fly and being able to sort of run a series of tool calls and then just get the final result back. And again, this is all just to improve the usage of the context window. Okay, so a lot going on on this slide. But at this point, this was around November time, we released our first blog post on long-running agents and how you would go about building these. So a lot of the concepts I've already described should make this fairly easy to understand actually, where say a human would write something like, you know, write me a browser or create a Slack clone or a Salesforce clone, just something like really, really vague. And the first thing that would happen, in this harness that we built is there's an initializer agent that would take that simple prompt and it would break it down into a series of persistent artifacts, the first being a feature list. of say X number of features. Featureless.json because we actually found the models might overwrite markdown files whereas they're less likely to just overwrite JSON files which is kind of interesting. It would also write a progress file, of course sort of start the git repo, build an init script and then just have a flag for whether the features are complete or not if they sort of pass all the tests. From there it would go into this harness loop where there's multiple different steps here. So the first one is, again, in a fresh context window, just getting the bearings, what's the present working directory, what's the progress file say, okay, and then doing a smoke test or running the init script so it didn't have to figure out how to do that every time, get the server up and running, et cetera. And then picking one feature. only one feature that hasn't passed all of the tests. Implementing that feature, doing some actual tests, much of verification loop, much like a human would do using puppeteer in this case. And then if everything passes, actually writing the git commit and changing. the state of this particular feature, it passes. And then if there are any features that are unfinished, just continuing that loop in a fresh context window. So we're starting to layer in a lot of these concepts here, fresh context windows, these sort of persistent artifacts, verification loops, really good planning upfront. You'll see like this is sort of the first iteration of these long running harnesses here. Okay, so. Continuing with the history tour, so then Opus 4.6, Sonnet 4.6. These models were really great because Sonnet 4.6 was basically offering that Opus level intelligence more at the Sonnet price and it became again very much a workhorse for a lot of cloud code. And Opus 4.6 just became really good at planning. We called it very much an agentic model. Opus 4.6 was great at deciding which tools to use and just being able to run for much longer. If you recall that meter chart, you'll see that this was a jump from about four hours up to 12 hours with sort of that very simple harness. So this model is very, very agentic. And then along with that, with some of the research we've done. We released agent teams, which the idea being in Cloud Code, the sort of more general purpose way for you to say scaffold out your own set of custom agents. And the innovation with agent teams is that instead of everything reporting back into the main agent, the actual sub-agents could communicate with each other. So they sort of had their own way to coordinate and then report back to the main agent only when it was required. Um, we also introduced server-side compaction, which basically meaning that these models can now just run indefinitely and compaction could just sort of, you know, happen on the server-side. And then, um, this one million context GA. So, now we have like one big context window. You see like the models are getting better. Maybe you can just run a lot, you know, within a single context window even instead of necessarily needing new sessions all the time. You see how things start shifting over time. So that's sort of the, uh, the whole overview. You can see all of the different, uh, releases that I shared here on this table, and you can see how it's changed from say Sonnet 3.7 at one hour, uh, to 12 hours with Opus 4.6. And then we have our own anecdotes as well, um, where tasks would take say, you know, like- 20 minutes when it was Opus 3.5 and now we're building say fully fledged apps that you don't have to run for 30 hours, they can run typically we're seeing like say three to five hours you can build like a really really fully featured application that runs out of the box. So what's really interesting is the harness doesn't just disappear as the models get better, it's really evolving as the models change over time and it's really fascinating to sort of find the- the gaps in the model and then fill that in with the harness and then you train the model on, um, the- using that aspect of the harness, then maybe at some point you actually remove that entirely and sort of this iterative, uh, loop just keeps happening over time with- with more and more of these sort of co-releases that we have. So, um, yeah, hopefully that was an interesting little trip, uh. back through the Claude evolution and how it applies to the long running agents. And so I'll hand over to Ash to continue with where we are today in terms of the state of the art. All right. Quick question. Any of you guys have any agents running at the moment in the background doing work while you're here? Just one, two, three. Okay. Probably should be more of you. Hopefully by the end of this, you'll have some ideas to take away and actually put into practice. So yeah, that's the history. And I quite like that quote that Andrew talked about, where the frontier doesn't really shrink, it just moves. And so what I wanted to talk about a little bit is some very simple kind of harness patterns that we've been playing around with internally that we use to build these like very fancy one-shot demo apps. But also, you know, we're experimenting with this stuff in post-training. in RL, how do we make our models and just the general behaviors more adept at autonomous work? So if you've ever tried to get an agent to try and review its own PR, you'll kind of understand where this is going. So this general idea is shamelessly kind of stolen from GANs. generative adversarial networks. So you have this generator kind of model and then you have some sort of discriminator and you have some sort of adversarial pressure between them. The generator builds, the evaluator grades, and the whole idea here is we're splitting up the context, windows, system prompts. the jobs entirely. The evaluator here isn't just reading diffs, but it's actually using Playwright to open live pages, click around, try things out, and then it eventually hands back whatever critique gets decided back to the actual generator, and you kind of continue that loop. Contrast that with what most people today are doing, which is kind of using one core code session, telling it to check its own work, and kind of loop that way. The obvious question for me at least is you know if the evaluator is also just an LLM Why doesn't it just rubber stamp it too? And so the key idea that we're kind of exploiting here is Yes, the evaluator is still a large language model and yes, they're still going to be biased towards Liking large language model style outputs But tuning a standalone critic to be harsh is actually very tractable. But tuning a builder to be somewhat self-critical is not. I think a really good analogy for this is the same as humans. It's very easy for me to critique a lovely piece of artwork or a fine meal. Much harder for me to actually go ahead and paint that or cook that meal myself. What we're doing here is exploiting the gap between the ability of an LLM to be a critic versus a generator. So the next thing I want to talk about is how do you actually think about designing these critics? It's very similar to the process of creating good evals. But in the context of full-stack apps, there are a lot of fuzzy areas which go into what makes something good. It's not just does it work, but does it look good, does it feel good, is there an element of taste? in these kind of products as well. So this is where we've been doing a lot of experimental work, especially when trying to imbue Claude with design taste and post training, but also create these kind of front-end design skills that we kind of put out there and just generally improve the front-end design ability of our models. So the way we think about this is most people say you can't grade taste, but we think you can if you have a strong enough opinion on it and you just kind of write it down. And so the way we do this at least is with kind of creating a rubric with four criteria, design, originality, craft and functionality. We actually weight this towards design and originality. We've kind of shifted the weightings between these four things depending on which models in play. But at the moment, you know, Opus 4.6 is pretty good at functionality already. the problem that we're trying to overcome is how do we prevent things like you know purple gradients general kind of ai slop type aesthetics in general and we kind of just go ahead and calibrate this with a few short examples on reference sites so the evaluators kind of taste converges on our own and let me show you an example i guess of what this actually looks like kind of in in practice so this is just an example of a model going through the similar kind of loop, generator, evaluator launches playwright, navigates, screenshots, scores on those kind of four criteria, writes critique, and then hands back to generator. So all of these examples are just HTML and CSS only that I've gone through for maybe four hours, five to 15 rounds. I think the interesting thing here, which is quite unique and something which you wouldn't necessarily get. if you're just using a single kind of agent loop, is that the thing pivots, right? So imagine the generator gets stuck on one of the full criteria. Let's say it's like really struggling and constantly scoring low on originality. This kind of GAN style harness which we're using will just throw the whole thing out and try again from scratch. Whereas in a single pass generation or a Ralph loop, it keeps trying to patch the same thing. And this kind of ability to course correct over very long time horizons is something which is quite unique to breaking down the different roles that go into building something. So that was just an insight into how we think about the frontend component. But how to go from just nice pages to fully working apps, we added one more role, a planner. And so, again, sounds very simple. It's ultimately just taking kind of a one-line prompt and then breaking it down into a very deliberately high-level kind of spec. So what it does is actually just spec the granular, sorry, it kind of specs the general workflow into a series of sprints. What it doesn't do and what most harnesses do today is necessarily try and plan the granular technical details of the product. The reason being is, you know, one, it's very likely to still make an error, but when it does make an error, it's going to cascade through every single one of these sprints and kind of magnify errors over a multi-hour time horizon. If you kind of squint at this, this is kind of just, you know, a very simple kind of like PM, IC, and QA kind of org structure, right? Like, we didn't invent this. We just kind of gave each role its own kind of context window. And the bit which is kind of interesting, I think, to talk about is the glue between the generator and the evaluator in this kind of setup. So before the generator actually goes ahead and writes a single line, we have the two agents basically negotiate what done actually means. And so let's say the generator proposes, I'm gonna build X feature and you should verify it by testing Y. The evaluator might push back and be like, actually, the scope is too big and those tests that you propose are a bit too weak and you've missed XYZ edge case. And you basically have this back and forth via files on disk. One writes the markdown, the other reads it, and you iterate until both agree. And then once you kind of reach that kind of condition, then you actually start building. And then the evaluator kind of grades against the contract. that those two agents have decided between themselves, not the original spec which the planner has one-shotted at the beginning. And why this matters, as it bridges this idea of user stories, i.e. the spec, and converts it into slightly more tangible, testable assertions, some sort of contract, without the planner having to over-specify upfront. And I think this is kind of the key innovation that the Ralph loop never really had. It had a kind of fixed plan.md style kind of thing, but nobody on the other side is necessarily arguing with kind of the main loop. And again, it comes back to like having these separate context windows and adversarial pressure. So let me show you an example of a very simple prompt that we had in a solo kind of loop versus the harness that we just discussed. So the prompt was basically build a retro game maker. And that was it. And I'm not going to try and convince you that this is necessarily the most cost effective or most efficient way to try and build an app. As you can see, one, it takes at the moment an extremely long amount of time. Two, it's very expensive. But also, as we'll see in a second, A lot of the stuff actually starts working only with this harness when it didn't in a kind of a solo loop. So this is what it kind of looked like, the opening screen, at least when we didn't have the harness. Pretty simplistic, a little bit boring, but it still looks nice, right? If this were the whole app, you'd ship it, but it's kind of the bait, I guess, if you will. This was kind of the sprite editor, if you will, again. still looks fine. The canvas is there, the palette, the frame timeline, live preview. Maybe it's a little bit cramped and the color picker is just black swatches, but it kind of works. Clearly the agent actually did understand what it was trying to do. And then the one thing that you have actually has to do, which is play mode. Entities rendered, score, health, all the other things which go into an actual game. Pressing an arrow key. does nothing, pressing a space key did nothing. The agent really didn't have any idea how to test itself, what it actually meant to play a game and actually succeed. And yeah, this is kind of the same prompt, same model, and this is kind of the breaking point. It kind of looks done on the surface, but when you try and actually push it to its limits, it just kind of failed. And then if we ran the same prompt with the same model, This is what it looked like when we ran the harness. So this was about $200, six hours. First up, it decided to name itself Retroforge. It decided to create a new project dialogue, have a very nice canvas. None of that was in our prompt. So this was all the planner deciding, OK, here's what the product decisions. should look like and then the two other agents deciding, right, how am I going to test this? If we look at the sprite editor, we have kind of a full 54 color palette, the kind of 8-bit preset from the project dialogue flowing through. You see the sprite at actual game scale. It's a lot more complete as a product in general. We had a whole new kind of AI level assistant. This is where it's kind of started to get recursive. The planner had decided, like, right, we should have some AI features, which is just a vague line in the spec. And the harness turned that into a full AI-level assistant inside the app that it was building. So, you know, someone could come in and say, hey, create a castle with sprites guarding it, let's say. This is something which a solo one would never even attempt to look at. Without the planner, that phrase just becomes... never even becomes a work item to look at. Then finally, I guess, the actual results kind of applied. So play mode, you know, you have this whole debug in the top left, which you can clearly tell is to make life easier for the evaluator, for example. Those numbers are live. The physics loop is actually running. Arrow keys work. The player moves. Collider's castle walls. because the evaluator actually launched the game, tried to play it, knew necessarily what features need to be tested to make this game real and successful. The difference between this output and the previous output is entirely just scaffolding. It's a very simple loop ultimately, but the results are quite startlingly different at least. In case you're curious, the kind of things which the evaluator did catch are pretty basic kind of stuff. It's things like fast IPI route ordering, passes every unit test but might actually break and prod, the evaluator catching things like the delete key, having some kind of Boolean logic bug. Again, these are things which were only caught because the evaluator is actually using the app. It's things which might get through CI in a RALF loop, but this isn't, you know, that level of specificity isn't something which happened by accident. And so this is the kind of level of detail which these models are kind of going to at this point in time. So we talked about the kind of contracts that the generator and the evaluator would write between themselves. For this app, it decided that there were 27 contract criteria. That's a level of granularity which we found that you really need to make findings kind of actionable. If you have vague criteria, you have vague critiques, the generator just shrugs and does things, whereas if you have granular criteria, the agent knows, okay, I need to fix this exact line. What's interesting, I thought, and I want to be honest about this part, is that out the box, Claude is a really, really bad, just general QA agent. Andrew talked about this a little bit in his bit, but the same kind of sycophancy and generosity bias that everyone hits with. general elements of judge systems also applies here. Most of the time in early runs, the QA agent would find a bug and be like, fix it later, might take two weeks, and then just be done with it. So we actually had to spend an exorbitant amount of time going through, trying to tune small layout bugs, edge cases, and feeding that into the prompts. I wish there was some kind of secret to actually doing this, but realistically the whole kind of art to building this system and making it good was kind of reading the traces. The primary debugging loop was this and not necessarily running more experiments. It was reading what the agent actually did, finding where its judgment diverged from ours as humans and then tuning the prompt for that. It was the same kind of muscle as reading kind of a stack trace. One kind of tooling tip that we had was kind of piping agent transcripts into files kind of grabbing them with another agent or having another agent kind of go through them and then kind of update the prompts itself So you have some sort of like closing the loop even on just like building this harness out so The last thing I kind of wanted to talk about was How to think about adjusting your harness as these models kind of get better in time. I think there's a lot of like discussion around whether Harns design is kind of dead or null, especially with models that, I mean, when I wrote this, it was just Opus 4.6, but even like mythos level models. And I think the key thing that we noted is it's really important to get a feel for what the kind of spiky behaviors of any individual model are, and then try and adapt your harness to kind of fill the gaps. So Andrew talked about this a bit, but context resetting between sessions. We kind of dropped that. entirely. Opus 4.5 used to have really bad context anxiety, whereas Opus 4.6 just didn't as part of post training there. And so one continuous session and compaction was more than enough to handle very long sessions. Sprint decomposition. We don't have a very strong opinion on this, but it was something which was really, really critical to getting Opus 4.5 to work. But Opus 4.6 was able to kind of hold a two hour continuous build coherently in a way without necessarily having to be force fed one feature at a time. The cadence at which the evaluator should run, previously we were running at every single sprint per se, whereas now we were just writing at the end of a one shot generation from the model and then passing back. So the harness is still the same, we're just kind of simplifying the specific. kind of loops and the kind of recipe that kind of goes into it. The lesson isn't necessarily our harness was wrong, but rather it was right for 4.5, the frontier moved, and we ran a simplified version to see how it worked. So this is kind of what the final kind of setup kind of looks like today. Having that planner generator, evaluator loop is still the kind of core of our system, but you can see we kind of ditched a bunch of the other kind of kind of components that made this slightly more complicated than it had to be. We also, as kind of mentioned, big fan of just using a file system for shared state instead of kind of leaning on context windows for very long running agents in general. And this is an example of the simplified harness running with one of our latest models. Again, very, very expensive, but you can see it's actually roughly like half the cost of the previous runs just because we're kind of doing things in a slightly more simplified manner, but it's still running over a very extended period of time. And so this is an example of a DAW, which is basically just like a music creating app, if you will. The agent sets the tempo, a key, it lays down the melody, it builds the drum tracks. This is the evaluator actually going and testing the app itself. We did actually listen to the music in this. Obviously, Claude can't hear at the moment, and so the music was pretty trash, but the app was really good in general and pretty fleshed out, which, you know, a model ago, this is something which would never have worked. But this is something which was possible with just a couple rounds. And this is kind of that meter curve which Andrew was talking about kind of really in action. And so I kind of wanted to close just by saying, you don't naturally need our internal harness to go away and start thinking about this. We are constantly trying to ship bits of these primitives into code code directly, but also there's nothing stopping you from just going ahead and building something similar to this kind of on your own. So we just shipped, auto mode is probably my favorite thing for slightly more safe YOLO, if you will. instead of running dangerously skip permissions all the time. We already have custom sub-agents as a primitive, right? Your evaluator, your QA role, give it a harsh system prompt and a very detailed rubric. Playwright MCP or Call for Chrome MCP, already extremely, extremely good at web app stuff, or just use computer use if you're building kind of native apps. And skills, again, a very nice way to package your kind of grading rubrics into your kind of general development flow. So, yeah, five things if you're kind of taking a photo, this is the slide I would say to kind of remember. Self-evaluation, very much a trap. Just use an adversarial evaluator. Compaction doesn't necessarily, does not equal kind of coherence, right? Lossy summaries really drift. Structured handoffs and clean context are a very good pattern what we've seen. Don't think that subjective quality isn't gradable. a strong view on what something should look like, then kind of force yourself to write it down. We found this made kind of a really massive difference to the quality of kind of apps that a model was able to generate. And then kind of finally was really just, you know, sit with the model, read the traces. Only then can you kind of really know what bits of a scaffold to delete, what bits to keep, especially as the kind of frontier moves. Yeah, that's it from me. Thank you very much for listening. And yeah, check out our blog post. But I wanted to just open up for Q&A in general, because we've been yapping for like close to an hour now. So if you have any questions for me and Andrew, just fire away. We'll do our best to try and answer them. Yeah. Thank you. Joan from both sides. One question for you. When you improve the evaluator by reading the logs and improving it, is that on a per project basis or more of a secret source that you reuse across project? The goal was very much to try and do this in a way which was reusable. I think anyone can tune this in a way that's... creating a very specific type of app, that's fine. At that point, it's not that different from going ahead and just prompting call code yourself and doing it, right? I think they were just, the key was like, what are the common patterns that you can kind of draw across the model weak points, right? So talking to that kind of front-end design piece, we knew what we thought good design would be, right? You could give examples like, this is what a read before pro looks like. this is what AI slop looks like, right? And that generalizes quite well. So yeah, this was all around web apps, but it could quite easily apply to other kind of things as well. Thanks for the test. Thank you for the presentation. Very interesting. I was just wondering, what is your view on the concept of dump zone and smart zone of a model? So I understand like... Before, it was around 40%. Now, with 1 million contacts, it's about 100K is what I understand. And the way I understood Ralph was designed is to kind of negotiate this problem. So basically, we're keeping the model always in the smart zone. So basically, I just slice the task below 100. So it's executed the task within the 100 contact zone. And what I understand from your presentation, you're kind of like advocating not to use it anymore. we can now rely on a compaction and so on. Is it like something you're suggesting to do or with still with like a rough loop model still has its own place given the smart and dumb zone concept? Yeah well I suppose from Ash's presentation and mine you see that the one million context Windows now GA and so you have sort of a bigger context to use. The models are more agentic so they can sort of maintain coherence for a longer period of time within that context window. And that actually with the release of 4.6 we decided to move from new context windows to just a single long running continuous session with compaction. So I think, I mean the. whether or not you use multiple fresh sessions or just one long running one is probably still up to your use case and your evals depending on what you're seeing is working best, but at least for sort of this general purpose generator evaluator pattern with Opus 4.6, we saw that it was possible to use a single session. I don't know if you want to add to that. I think it's also just like a temporary problem, right? Like context rots is you know, a failing of like today's models to some extent and much less so than, you know, even just one model generation ago. So is there a place for, you know, the type of thing which you're discussing? I think yes, depending on use case, but, you know, it's not like a, it's one of those pieces which I'd look at as like, okay, as soon, you know, I'd be kind of hunting for the model release where I can kind of strip it out, let's put it that way. They always have a lot of FOMO around. playwright. I mean you said playwright MCP, playwright skills. Can you speak to how to improve the playwright? Because I imagine I would like to have my browser open and then I can see the model working through it and then maybe I could steer it, you know, the few tabs open. But like, yeah, is there some innovation there I'm missing out on or is playwright MCP really? What do you recommend people use? Playwright MCP or just use the Code for Chrome MCP, which is like a slightly more robust thing, I guess, around browser control. I mean, I don't know why you want to watch it do things. I mean, you can, but I think that's like a trust gap, right, today. Like, you know, the whole point of what we're trying to get to do here is like, you set something off, you trust it to do it, do the work and test it, and you have the confidence that it's doing it correctly, and you come back to it. And that's where, you know, yes, there's going to be some iteration at the beginning where you're like, watching, reading the traces until you get to a point you can trust it. But at least internally, right? Like when I'm doing full stack app dev, I have got to a point now where I'm like, okay, with Opus 4.6, I can like reliably trust the model to go ahead, read network errors, console errors, actually navigate an app, zoom in where it needs to. The vision is now good enough on these models that I can like identify overlapping text on elements and things like that whereas that just wasn't the case until realistically the last you know generation models so yeah I would I would recommend I'm curious like with the generator evaluated pattern what happens do you can you throw unlimited tokens at it or will it stop because the evaluator is not good enough like you tell me more about that Sorry, do you mind clarifying? I kind of messed up. Yeah, so, okay, let's say I say, okay, create, like, a very cool game with some features. You have to generate an evaluator pattern that creates, like, contracts, builds the apps. If I... Then it will give me back something, right? Can I restart it again and say, like, okay... I'm not happy about it and generate the evaluator will pick it up and make it better? Or will the evaluator not go to at one point and just say, this is it? First of all, if you want some level of human in the loop in this process, implement hooks at some point in this loop. I think the bit which was kind of surprising to us, was with this general pattern and especially with the 4.6 model, both Sona and Opus, it was extremely willing to throw away everything. Even if it had done 10 passes at something, it was very happy to just throw it all away and start from scratch if for some reason it wasn't able to hill climb against the rubric of the evaluator in an effective way. And so that's why when we're playing with this kind of thing, we didn't naturally lean towards having some kind of resume or human loop type intervention system, I guess. And we didn't really observe, we expected to, but we didn't really observe that kind of behavior which you were talking about, where it kind of just like, evaluators like, I just give up, let's just like pass it on, shall we say. Yeah, it was just much more willing to like throw away everything and restart. And that was just a behavior which we never saw when it was the generator itself almost kind of being part of its own work and being like, I'm not gonna restart this whole thing. So yeah, I mean, there's been an example which I've seen where the evaluator is like, it kind of gets fed up and is like, right, this approach you're taking just obviously isn't working. Can you just like delete everything and restart? Which I don't know about you guys, but. vibe coding regularly, I often do as a human to like, you know, just benefit from fresh context windows, not have to deal with an already messy code base, et cetera. So it's quite neat seeing models now also kind of get to that point. And also just briefly add, obviously you can then open that code base in Cloud Code and continue where you left off. Sort of goes without saying. And I think we're generally thinking about what the workflow looks like if it's sort of more back and forth, because there's sort of the extreme of build me a really complex gaming application that you don't know, is it gonna take three hours, is it gonna take 20 hours? It's a bit unclear, so maybe there's sort of something in the middle that's like more of a feedback loop. I really like the idea that you have of like, there's a human element here, where it's like PM, engineer, evaluator. PM role is a lot of the time it's like scope creep and keeping the time going and stuff like that. but you're just like letting this off. You're letting engineers go play in the sandbox for ages. Is there a harness loop that needs to go back to the planner eventually? Does it need to move again? Well, maybe because we're engineers, we just decided like, ah, screw the PM, we'll just shove it to the side. Well, this is where the kind of like, that kind of contracting piece between the kind of... evaluator and the builder worked quite well. For context, in that, we typically insert the main spec that was generated by the PM per se into those sessions regularly. So that, you know, it's always a reference point for like, okay, this is what we're still actually trying to build. And the main function of then the builder and the generator, sorry, the builder and the evaluator is just to like figure out the exact feature set and tests and contracts per se that actually satisfy that spec. But the reason we don't is because we don't want the planner to be like a core part of this loop. It should be very high level. It should, its purpose really is just kind of set out like kind of the hard outer lines of what this product could be. But its job is not necessarily to come in and intervene and be like, actually, this is like an impossible feature. We should not do this and edit itself. We kind of wanted to keep that context relationship between just the builder and the generator. That being said, this loop, I've applied it in lots of different ways. It doesn't have to just be one generator and one builder. That adversarial trade-off can be applied to a workflow consisting of multiple separate agents. I don't know. If you're trying to do, I don't know, generate evals, let's say, you could use a similar harness to be like, hey, generate a, it could be like, planner, generate a synthetic, a generator for synthetic data sets, right, with a QA agent, then hand off to like an integrator, which like actually wires up something, also has a QA agent, then has like a final kind of a, you can basically add this kind of generator evaluator thing into a multi-step workflow. We each like build a, that maybe has like a slightly different function per se as part of a longer workflow. So there are different ways in which you kind of keep things on track depending on the task and break down. This this general pattern and just like more specified You know tasks or workflows if that makes sense. Can you you mentioned that? Some of the later tasks could not possibly be done by an earlier model. Can you talk a little bit about your process? Comparing the tasks on the different models like do you fire off the same task on opus 4.6 opus 4.5 sonnet or Is this sort of artisanal? co-evolving harness model set up obviating that. Yeah, I mean, I suppose we walk through the history a little bit. And if you look at say the first blog post on long running agents, first and more recent one, there's some pretty significant differences there. One being what we were just discussing that the initializer agent would build this super comprehensive spec of say 200 different features. And then in then the loop would have to actually go and execute against every single one of those features which may lead to say incorrect design decisions but it's sort of forced into that behavior. Whereas I think now you're able to have sort of a more generic creative direction set with say Opus 4.6 and then just having this loop of the generator evaluator. But it does. Yeah, your model selection does inform your harness design very much so. Of course, in a perfect world, you could just sort of throw everything and say, Opus 4.6, but if you have cost concerns, for example, maybe you do use Opus 4.6 for planning and then Sonnet 4.6 for the coding or the execution, that's something that we tend to see quite frequently. But again, if you're building specific sub-agents for each of these, you probably wanna have some evaluations to be able to understand for that model and that prompt how it's performing against that task and then just optimize. Do you have any advice on moving beyond sort of these one-shot applications to long-lived products where you're looking to make changes days, weeks later? What sort of artifacts you need to persist to future instances to be able to know what has come before, what can I change, what should I change? Yeah, it's something which we're working on. Like right now, we use similar patterns for just a bunch of random stuff internally, shall we say. And so at the moment it's like, set this thing off, it's running on a remote server somewhere, and I'll just come back and check it after this talk, let's say. And then I kind of iterate on it manually in pull code directly, like polish any rough edges, that kind of thing. I think in terms of the way that you're actually setting up this harness, just having... This is why we kind of default to kind of using a file system estate for this kind of loop. One, because it's just very easy for another model to come up and grep through and pick up what's been going. But one thing which I like to do is kind of embed little bits of prompting throughout this kind of loop, which basically tells it to write kind of learnings and states to some kind of JSON file because the model doesn't kind of overwrite that too much. And so... The nice thing about that is you're basically just leaving breadcrumbs for another model to come and pick up. So honestly the key thing for me is how do I instruct this harness to leave crumbs for a human to come in and then use code code on top of. So generally it's like hey, the shape of that file might be like tried this, evaluated found this bug, implemented this fix, this fix worked, yes, tick, and then continue. uh kind of time log if you will of like everything the model has tried the fix it's made in the final state and then also having some sort of live updating kind of set of docs if you will just very high level here's the file structure and then those two files to be honest are more than enough for claw code and human to come in and start iterating on the app with but that's all we're doing at the moment perfect So it's very interesting to hear the, yeah, first of all, congrats on the presentation. And then I was wondering, there are kind of two approaches, like you have the agent team, where multiple agents interact with each other, and then the explicit generator critic setup. Because in a sense, like the agent team has the same setup where the main agent instructs someone and then... can act as a critic for the sub-agent, but what are the current failure modes that causes us to still need the specific generator critic harness instead of just the agent team itself? And then what's your estimate of how many model generations we would need to just completely rely on the agent team? Maybe, I can sort of address the first aspect of that. I mean one of the limitation of, firstly, Cloud Code is using the same harness that is the agent SDK. So you can, technically you should be able to build this type of a pattern into Cloud Code. Agent Teams is a useful framework for potentially doing that because you could say have the generator and the evaluator sort of intercommunicating or maybe it's the generator is sort of the main agent and the evaluator is say a member of the agent team. But I think it sort of evolved more so from that first blog post that I shared. I think that was the results of that to some extent to try and make that more generally available. But one of the things you're limited by obviously is cloud code would just have to run on your machine. I think with the agent SDK you can also just run it in more of a cloud environment and a sandbox environment for long periods of time and without it failing or you having to run the caffeinate on your machine. But I think, yeah, Cloud Code is a good testing ground for building out any of these types of harnesses to experiment and explore and see what works before maybe you build it into the Agent SDK and then actually deploy it as its own application. And yeah, I mean, again, I would just experiment, see if Agent Teams is something that makes sense for you, or if maybe just using regular sub-agents or some other framing of it, it works better. But yeah, I think people are using Agent Teams. a ton i don't know yeah well this is the thing is like i don't think we have like a super strongly opinioned viewpoint on like um what is the best at any you know setup at any given moment in time so boris always like updates his tweets like this is what i'm doing now um like agent teams are something which a bunch of people loved internally um and so we were like okay let's ship it let's see what people think about it in the field um i'm not saying we will but it you know we regularly unship things as well And I do see the generator evaluator kind of pattern as like a subset of that like teams approach to thinking about sub-agent design, not necessarily like contradictory to it per se. You know, you can imagine like, you know, classical in which teams breaks down is like, you know, front end, back end, some sort of integrated between them, like sub-agents. Each of those probably deserve their own kind of critic, kind of agent pairing with them, for example. So you can kind of see how the two concepts overlap. Just the general idea behind this is, you know, most people when they're running code code, at the moment, the goal isn't to like one shot an app over like six hours. And so that isn't necessarily primitive, which we like by default like ship there. So yeah. One thing I was wondering, have you also tried like a critic that gets the context of the generator? Then you feel like? If it has some clue about the traces of the agent or like the executor? Yeah. Is that currently the case and the critic? We use like a handoff pen. I would be very hesitant of that. We did try this, but this is the whole like muddying of like thoughts between the two model streams. I think it's actually much more effective to just let it judge the output and just provide instead of being like, hey, you made a misstep. when building this by doing x and that's what's resulted in this issue it's much more effective to just have the value to be like this is an issue and then let the generator purely reflect on its own work and then try and figure out how to fix that issue um otherwise you kind of just see we found that it's very easy for the model to like kill itself that something is working or not and that feed into the value as well last note on that i think it would then be interesting if you live for the training team if you could train like the generator to predict what a critic currently said? Yeah. To have it be more honest about what it did and stuff? Maybe we'll work on that. I want to ask more about traceability. Like I use superpowers or like my own prompts to generate like multiple sub-agents to implement my, let's say my software or app. But what happens is like I don't really know. I want to go back and see where it actually went wrong. even but then I'm not able to figure out how to find those traces. What do you use for traceability is my question when you have so many like five, six agents running in background like yeah. To be honest a lot of us is reading through traces by hand. We do a lot of that I would say at Anthropic in general just like reading through traces by hand. We also just like have you know hacked together various things where we you know point clouds. at a bunch of traces with some custom prompts to try and identify like issues with the loop, like this is where it veered off and whatnot. We kind of use that as like a first pass, I would say, maybe to just kind of like see where something might have gone wrong. But to be honest, by far and away, the best approach that we use internally is just reading the traces by hand. Only then do you truly get to relate to what the model is trying to actually do. Yeah. Thanks for the talk. I have a few questions. First of all, how do you measure the quality of a harness agent pair? It feels like a vibe check, like it's a green field. Let's build an app. But let's say you're going into a new project, maybe brownfield. It feels like a vibe check or some kind of art. Can you make it more scientific or is that just not feasible? I mean, the way that we've thought about it at least, right, is like we specify the rubrics in kind of extreme detail at the kind of generator and evaluator level, right? So we talked about, for example, those four kind of criteria. That's very high level, the rubric, which we use for like design taste, let's say. And so we set those up for various bits of this app, right? So that can be just for the design element. maybe another piece for how we think about API design, let's say, code quality, whatever. And we kind of use those as the kind of various rubrics which we're hill climbing against, right? And then the evaluator's jobs that encourage the builder to hill climb against those. And so for any given app or output, we have a signal of this is where the model started on those kind of criteria and this is where we kind of ended up. Now that's less useful for like kind of, like you said, working on kind of newer code bases, but it still applies, right? Like you could point, you just have to start the loop in a different way. You would just point the evaluator at a given code base and be like, this is where we are now. And then give it the spec of what you're trying to achieve and then let the loop kind of iterate against those kind of criteria. So it's like a necessarily a one. set of evals at the very end, it's kind of like, here are the criteria for what we think good looks like, then letting the evaluator and the generator come up with a set of kind of tests or contracts that needs to satisfy, and then letting it just as the harness hill climb against those. That's not super comparable across different products and runs, but it's very useful for, yeah, within a product or run. Also this particular pattern. is it's great for Greenfield like you said, but it's quite opinionated. You know, it might be using React, like Postgres as a database, a node on the back end, but your Brownfield app might be using something totally different, or the rubric that we've created for what we think good sort of design patterns are might be totally different in your project. So I think that's why we're proposing this as more of a pattern that you would then tailor towards your application. Do you use, do you like direct the harness individually and how do you cooperate as a team on that? I find it's very hard to like when I share my screen and I'm working conversationally It's very hard for people to keep up and the other way around I find it cumbersome to dictate what to prompt How do you cooperate as a team? Do you have like team-owned harnesses? Is it maybe a good feature for cloud code? Yeah, maybe. I think we probably do have work to do on that. Quite often what happens internally is people come up with these ideas and they're generally quite bottomed up adopted by different teams and it's then the job of the kind of original idea holder, shall we say, which was Prithvi in this case, to kind of maintain it and make it kind of composable and generalizable for different teams and different teams will adapt it. uh make it useful for like their section of a code base let's say um but we don't have any like good things and that's i think like you know even just observability like some other people talked about right is like a um generally speaking a thing which is not fully solved yet for these like ultra long-running uh agents and yeah interesting area of kind of greenfield software to explore Yeah, that is an interesting one, whether it should be sort of a collaborative experience in Cloud Code or even Cloud.ai. I think just leveraging software engineering best practices with version control and bring your commits and pull requests, or if you're working on your own using something like Git Work Trees so that you're not overriding the file system on multiple different features all make sense. But yeah, I think when it comes to collaboration, maybe it's something that doesn't. Happen quite as much because people just build these projects as Ash said from the ground up and then sort of you know present them to the rest of the company I Jose from Mercedes-Benz Research and Development here. Hi. Thanks for the talk While looking at it I thought okay looks a lot like a scrum team a feature team working for longer times on a product and I was thinking How does human in the loop? look like in that scenario? Because you had this kind of sprint. Have you thought about a sprint review kind of moment where you, as a human, get asked, oh, hey, here's what we built the last two hours. How's it looking like for you? Yeah. Should we subject our agents to the same trauma that engineers go through of scrum review? I mean, like the whole point of this general, the general idea, which behind this talk and also what we're trying to do is like trying to be as like AGI-pilled as possible, right? Like how do we build harnesses where we don't need a human in the loop, right? Like, what does that look like? Are we using this today for everything? Obviously not, right? But the goal is, you know, this is a technique or a pattern which should extend very nicely such that you don't have a human in the loop for most things. If you did, right, it's like, you know. hooks is probably the main primitive to just basically inject given some sort of specific type of stop condition, let's say with an evaluator, to basically like hand back to human, allow some kind of developer message input and then continue the loop would be like kind of a simple way to implement it. But yeah, to be honest, we're kind of exploring this from a what can we do fully autonomously kind of approach as opposed to thinking this as like, here's called code and like how do we make this more powerful per se? It's very much like a more greenfield exploration of agent design. No, of course, it's just like if I would get the chance to review it maybe a few hours in, then I might be able to steer it in a way better way so that eight hours later it's more like the one kind of project I would like to have. Yeah. I get what you're saying. I think the question then is, should that be a permanent feature of the harness, or is that just a thing which you should have basically prompted around when building the harness? So we would have that. We would run this harness on loop, and we would have, we might spin up 10 generations of different things, and three of them succeed and seven of them fail in random ways. And then we would just sit down with those seven, read through them. Adjust the prompting of the main harness and then and then try again and then until we get to a point where we're like quite happy leaving it run Leaving it to run fully autonomously. So ultimately that's still the end goal for us as opposed to being like Basically giving up on the harness and being like okay We're just inside a human hair to like cover for any kind of stir ability issues instead but rather Embed that and bake that into the harness itself In the first place have you used this to build anything like sort of like non-Greenfield or I guess like production like anything in Cloud Code itself or have you used it for actual features and seeing it to the end? I think I mean this does mostly extend to Greenfield projects I think for Brownfield maybe you do need a little bit more control as you're starting to build out your own rubrics and patterns I mean what we're seeing in Brownfield is that if you look at the whole software development life life cycles, not just the coding aspects that people are starting to use something like Cloud Code for. It might be, say, there's autonomous monitoring happening, and then that could feed into, say, generating some kind of issue or feature request that could then just feed into an agent that would then go through to make the pull request, and then there's sort of a pull review already happening. and then maybe you're just reviewing that before you actually merge. I think there are other ways to automate the whole software development lifecycle in a brownfield project, but I think that this particular pattern, maybe without a lot of testing within your project and customizing it for your project, it's probably more suited towards brand new applications. Have you built any greenfield apps, I don't know, like an internal tooling or anything like that that you've been using, not just a demo? Yeah, to be frank, I can't really talk to internal tooling too much, but a good anecdote of this was a lot of the new and fun stuff that you see in code code will, when I'm speaking to the team and working with them on stuff, use a lot of the lessons from this per se, in even just general hands-on code code usage, the way that they prompt the main model to spin up a sub-agent let's say and go after something. Or as Andrew said, in kind of monitoring and bug fixing loops, like when generating a fix, should you have a separate evaluator and a generator go after the same thing? So a lot of these principles apply. Is it like one for one this? Maybe not, but it's like taking the good bits of this or whatever you think is kind of applicable to a certain space and field and then kind of running with it in your own way. Thank you. Hi. You say reading the traces, is that literally just like the raw output or is there something more specific you've prompted it to like write this to file, these are the sorts of things I care about and I want to see. No, you've got to read the whole thing. Read the whole thing. I do think it's like a really important skill when building agents in general is to like empathize as much with the model. This was like, there's an interesting anecdote which we used when we were building, for example, the agent harness for called for Chrome, which is our kind of browser use thing. And we would run this experiment where imagine if you were trying to navigate a web page and click around where you're effectively doing with your eyes closed and every 10 seconds you just opened it to see a static page and then closed it again and then had to do things. And really putting yourself in the shoes of the model is kind of like this kind of empathetic skill set which you need to develop. And the only way to really do that is to spend as much time with these models but also reading through. line by line being like, oh, why did it think this? Oh, I can kind of see why I did that. And then kind of adjusting the way you instruct it next time to do better. But that's why I think Claude of Cremes is very good with just really just like spending a lot of time as a team, closing our eyes and trying to navigate web pages, for example. So, yeah. Yeah, and I think then actually taking those learnings and putting them into, say, your prompt templates or your Claude.md or building a scale or just generally understanding how to sort of avoid that type of behavior in the future. I know Cloud Code now has auto memory for sessions as well. So it's sort of constantly memorizing little things as it goes. But yeah, you can learn quite quickly from reading some traces like where things might be going wrong. Cool. Should we wrap up there? I think we have a few minutes left, but we'll be around in general in case you guys want to ask any questions or just chat. But otherwise, thanks for coming down. Yeah, thanks. you

⚙️ Pipeline jobs

StageStatusAtt.UpdatedError
download done 1/3 2026-07-20 13:39:02
transcribe done 1/3 2026-07-20 13:39:52
summarize done 1/3 2026-07-20 13:40:51
embed done 1/3 2026-07-20 13:40:55

📄 Описание YouTube

Показать
Why self-evaluation is a trap and adversarial evaluator agents work better; why context compaction doesn't cure coherence drift but structured handoffs do; how to decompose work into testable sprint contracts; how to grade subjective output with rubrics an LLM can actually apply; and how to read traces as your primary debugging loop. Plus the question nobody asks: which parts of your harness should you delete when the next model drops?

Speaker info:
- Ash Prabaker  |  https://www.linkedin.com/in/ash-prabaker/
- Andrew Wilson  |  https://www.linkedin.com/in/anddwilson/

Timestamps:
0:00 Introduction and speakers
1:21 Overview of long-running agents
2:29 Challenges: Context, Planning, and Judgment
4:14 Two approaches: Model updates vs. Harness evolution
5:58 Prehistory: Sonnet 3.5, Computer Use, and MCP
6:34 The evolution of Claude Code
7:55 The Ralph loop technique
9:49 Sonnet 4.5, Agent SDK, and checkpoints
10:49 Opus 4.5 and the role of sub-agents
12:05 First long-running agent patterns
14:20 Opus 4.6, Agent Teams, and server-side compaction
17:28 State-of-the-art harness patterns
21:30 Evaluating subjective output with rubrics
23:44 Introducing the 'Planner' role
25:04 The generator-evaluator contract
31:28 Specificity in contracts and debugging traces
34:14 Adjusting harnesses as models evolve
37:56 How to build your own agent harness
39:01 Key takeaways for long-running agents
40:05 Q&A session