← все видео

Agentic Loops Are Changing Software Development

Web Dev Cody · 2026-06-08 · 10м 5с · 19 854 просмотров · YouTube ↗

Топики: ai-loop-engineering

🎧 Аудио

📝 Summary

model=deepseek-v4-flash · prompt=summary-v7 · 4 751→1 863 tokens · 2026-07-20 11:47:03

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

Agentic loop — это подход, при котором AI-агент не просто генерирует код по одному промпту, а выполняет цикл: получает задачу → реализует → автоматически валидирует результат (через тесты, скриншоты, анализ) → исправляет ошибки → повторяет до полного выполнения. Благодаря большим контекстным окнам и способности удерживать сложную задачу, такие циклы позволяют агентам работать автономно часами, последовательно проходя чеклисты и исправляя собственные недочёты.

Традиционный подход: промпт → ручная проверка

Раньше разработчик писал промпт («добавь фичу X, Y, Z»), иногда использовал «plan mode» для лучшего результата, а затем вручную проверял полученный код. Это требовало постоянного участия человека на этапе валидации. При таком подходе каждый цикл «промпт → ответ → проверка» заканчивался ручной работой.

Автоматическая валидация как основа agentic loop

Теперь можно передать контроль обвязке (harness), которая сама запускает тесты для проверки результата. Валидация происходит через end-to-end тесты, Playwright MCP (загрузка браузера, просмотр страницы), unit-тесты или анализ lighthouse-скор. Пример: если дать агенту задачу «улучшить UX страницы», он не только вносит изменения, но и самостоятельно открывает браузер, смотрит, как выглядит страница, и повторяет правки, пока не достигнет цели. Самый простой цикл — «напиши Playwright-тест и запускай его, пока фича не заработает как ожидается».

Команда /goal в Claude Code и Codex

Для реализации agentic loop в Claude Code и Codex используется команда /goal. Разработчик задаёт высокоуровневую цель, например: «работай над feature.md до полного выполнения и верификации». Промпт может содержать план с 20–40 пунктами чеклиста. Агент читает файл плана и проверяет, завершены ли все пункты. Если какая-то задача провалилась (например, сломанный GitHub Action), можно дать команду: «/goal исправь этот GitHub Action, пока он не начнёт проходить». Агент сам подтягивает код из GitHub, пушит исправления, следит за статусом CI и повторяет цикл до успеха.

Двойной цикл для UX: сначала реализация, потом улучшение

Валидация пользовательского опыта сложна для автоматизации. Решение — разбить задачу на два цикла. Первый цикл: реализовать фичу, проверить через end-to-end тесты. Второй цикл: итеративно улучшать дизайн и UX, делать скриншоты на каждом шаге, а по завершении уведомить разработчика. Так можно довести интерфейс до нужного качества без постоянного ручного вмешательства.

Примеры production-скриптов: рефакторинг, безопасность, производительность

Кроме одноразовых задач, agentic loop можно настроить как cron-задачу. Например, каждое утро агент проверяет код на дублирование, магические числа, проблемы поддерживаемости и создаёт pull request. Другие сценарии:

Практический пример: расширение функциональности с под-агентами

В демонстрации автор добавляет поддержку DigitalOcean сандбоксов в проект Mission Control (уже были AWS сандбоксы). Промпт просит создать пустой файл с фазами и чеклистами:

Агент запускает 5 под-агентов для изучения существующей кодовой базы, чтобы переиспользовать адаптеры и логику. Затем по готовому плану (длинный чеклист из 5 фаз) даётся команда /goal пройти по всем пунктам до полного завершения и верификации. По пути выполняется test-driven development: каждый пункт реализуется вместе с unit-тестом или Playwright-тестом, и агент не переходит к следующему, пока все тесты не проходят. Такой цикл может работать 2–3 часа без участия человека, а разработчик лишь просматривает итоговый diff.

Ключевые рекомендации для эффективного использования

📜 Transcript

en · 2 386 слов · 25 сегментов · clean

Показать текст транскрипта
So it seems like the engineering buzzword of today for AI is something called the agentic loop. So let's just go and make a video about agentic loop. All right. So traditionally, I want to start with like how we've been doing things for a while and how this is all changing because these models are getting smarter. They have larger context windows. They can stay on task and kind of go through a to-do list. And that's enabled something called the agentic loop. So before we'd be the AI operator. We're the prompt or we're the developer, whatever you want to call yourself now. And we basically write a prompt, right? So we have like a little prompt here that says, I need you to add in a feature X, Y, and Z. Maybe we'll throw it into a plan mode so we can get a little bit better results. But when this is done, what we have to do is we end up going back and we have to like validate it. And I'm going to say manually validate. Now, very quickly, we reach the point now where it's like you don't just prompt and manually validate stuff. You can actually have the harness. do the validation automatically. So we still send in a prompt, but at that point we kind of release control over to the harness, and the harness is going to go ahead and just try to validate itself. So validate, and it can validate using end-to-end tests. It can validate with like a Playwright MCP. It can go and load up the Chrome browser and look at the page. If you want, for example, to have it... slowly improve the user experience of a page, you can give that as a prompt. And what it does is it's going to go and validate that, and then it's going to try to fix its issues automatically. So this is basically the simplest loop. You probably have tried this already. And this works actually very well. Like for most of my work, this is kind of what I do. I will have an initial prompt and I'll tell it to... continuously run into intest or write a playwright test until you have validated that the feature I've asked you to add in works the way you'd expect it to work. Now to achieve this, what I end up doing is I use this with a goal command. So inside of Cloud Code and Codex, you can actually give it a slash goal. And this is where I give it my prompt. Now, sometimes the prompt is larger. You can have like a large plan that has 20, 30, 40 checkbox items. And you can say, hey, I need you to go ahead and say, work on feature. MD until fully done and verified. Okay, I'm gonna go ahead and just move that down so you can see it. So there's a really basic loop that I've honestly done a lot where the prompt is actually this and then you'll have a feature MD somewhere on a file and that basically is going to let the harness know that hey like you need to basically keep on reading from this thing and checking if you're done. That's the current loop I've been doing and I would even recommend that you try doing this as well when you're trying to build out code these days because you can have these things automatically run tests until it gets the job done. And I've done this approach with literally everything. If I have a failing GitHub action, I'll say slash goal, fix this GitHub action until it's passing. And the agent will go and pull from GitHub, look at what failed, it'll do a commit, it'll push it, it'll then go and watch GitHub to see if it ever gets at the pass and it continues to do this in a loop until it's done. So this is what we're talking about with agentic loops is that we've reached a point now where these harnesses are very powerful. You can give it a high level goal or task and it's going to keep on iterating until it's basically done. Now the hard part is the validation step, right? If you're using a web application, you can use Electron, you can load up up here, you can click around. If you're doing like a backend API library or framework, you can do end-to-end tests as well. You can do unit tests. These are all great ways to validate. At some point, you do need a human to kind of validate that the user experience is good. Or you could probably ask the harness to run a phase of its loop to say, hey, double check that the user experience that you're adding to the website is actually good. But you could also do that in a different loop. You could have a different loop that runs when you fully implemented the feature. And the second loop could be like, hey, I need you to go in. iteratively improve the user experience and design of the web page, take screenshots along the way as you're trying to improve it. When you're done, go ahead and just let me know. So that is the overall idea of looping. Now, if I were to go to like Cloud Code, I can even show you this. If I go slash goal, this is the goal command, which you can use to do exactly what I said. Now, another really interesting thing that they have is something called a loop. Okay, this is like an interval. I think it'd be better named interval or timer or something where you can have something run every hour or every day. And so one thing you could also do with this agentic loop approach is you could set up a cron job to say, hey, every morning I want you to go through my code base and identify as many places as you can to clean up code, make sure it's maintainable, make sure you don't have duplicate numbers or magic numbers everywhere. And then you could say, I need you to create a pull request off of main when you're done with this work. So that's another really good example of having this loop, right? You need to think at a high level, if you were given this task as an engineer, what exactly would you do? And then remember that you can actually offload this to agents doing this. So now that you have one agentic loop running, the idea is that you can actually have many of these things running. You can define many different loops with different agents that are doing, you know, code refactoring. One's doing a security audit. One's doing a performance review. And all these basically run in a loop with some type of validation step. Like if you're trying to do... I don't know, a performance audit, you probably want to tell it to add in some instrumentation to verify that what it's changing actually makes the page load faster. Another good example of this is I've done lighthouse scores. I told it to load up the website, the landing page over and over again until you get the lighthouse scores to be 100%. And you'll just watch it run for like 30, 40 minutes until it changes all your landing pages. It tries to really compress your images. It makes things load in a particular order that makes it fast. And then eventually you'll get really good lighthouse scores. So hopefully that can help you think abstractly of how the looping kind of works. What does an agentic loop kind of means? Because it sounds like a buzzword, but this is actually a real practical thing that you can do with agents now with the goal command and the long context windows and the ability to stay on task. Now, the most simple thing that I would probably use an agentic loop for is implementing out a new feature. So that's the overall idea of what the agentic loop is and how it kind of works. Let's actually see it in practice, right? Let's give you a real practical example. Right now in Mission Control, I have the ability to spin up sandboxes, but now I need to add in the ability to spin up digital ocean sandboxes. I want you to create an empty file with a bunch of different phases and checklists so that I can actually work through these one by one to implement this new feature. Go and explore the current code base. with five different sub-agents. The MD file at the very least must have different phases of development. You must have phase one, which is the implementation. Phase two is the security audit. Phase three is the performance audit. Stage four is the clean code and maintainability audit. You need to make sure that you go through these stages one by one after you've implemented your features and make sure you also do test-driven development to validate what you're adding actually works the way it should. All right, so let's just run that prompt. And honestly, a lot of the things I mentioned, like the performance audit, security audit, the clean code, those should be skills that you have set up already that you can just tag them when you're prompting. You can have it automatically do this, or you can have a template of your loop. Like when you're adding a new feature, what are the things that you do every day as an engineer? And can you just automate that with the agent to kind of do that stuff for you? The goal is you want to reduce the amount of additional human review you have to do at the end so that you can just skim through the code changes, make sure everything seems like it's good. And I found if you're not explicit with asking it to do a security audit, asking it to do performance audit, it's not going to do it. And so you have to come back and you have to fix stuff along the way. Okay, so you can see here it's going through my code base with five different sub agents. It's trying to really explore my current approach for sandboxes because I do already support sandboxes, right? So for example, if I go to mission control here, And if I go to create sandbox, I have this tool that allows me to create an AWS sandbox, but now I'm trying to extend it to support DigitalOcean, maybe support Railway. I could support Google if I wanted to. But the idea is you want to have the agents go off and get as much information about how stuff works. so that it can reuse existing logic, it can make sure that the code it adds in is using proper adapters and all this other stuff. And again, some of the keywords I'm saying, adapters, maintainability, those should be skills that you've kind of already created yourself or maybe in your CloudMD file so that everything tries to follow this. But you'll see in a second when this is done creating the plan, the plan will have a bunch of checklists and then we can just prompt the agent to kind of go through one by one. And as it's filling out the checklists, it can just run all night. Like it's going to take like two to three hours to run through until it fully finishes that initial request that you asked it to. All right, so let's go and look through the plan now. So the main thing I want to point out with the plan is the checklist. OK, and I'm sure you've seen this before. You have a plan, you have some checklists. The good thing about having these checklists is that when you use a slash goal command. you can tell it to go through the checklist items one by one and only consider the goal done when all these things are completely checked off. Okay, so this is a very, very long plan. It's like five phases of a bunch of different things. But the idea, if you want to actually kick this thing off, you could go into Claude Code and I will just go ahead and say slash goal. I need you to go through this plan and continue to work on it until all of the checklist items have been finished and verified and checked off. And then I'll just go ahead and paste in the plan. Okay, so this is basically setting up a goal, an expectation. You have a loop in place of what it needs to do. And then eventually it'll go through every single item one by one. It'll finish it. And then it'll verify itself along the way as well. So if you did specify that you should be using end-to-end tests or playwright tests or unit tests to verify the work as it's being created, do not finish until all the tests pass. That is also something that you should probably set up in your loop. And the idea is that you can kick these things off. And if you have many different work trees, you can kick off different refactorings, different features inside of these different work trees with different goals, with these loops in place so that you can come back later and basically see a completely working feature that has already been automated and tested for you along the way. All right, so that's all I wanted to talk about. This is the agentic loop, and I would recommend to at least play around with this. It does actually produce really good results if you ask the agent. you validate it steps along the way so that it has something to kind of work towards, right? Give it a goal, let it work towards that and give it a loop of instructions that it should do every step of the way. All right, hope you guys enjoyed. Have a good day and happy coding.

⚙️ Pipeline jobs

StageStatusAtt.UpdatedError
download done 1/3 2026-07-20 11:46:35
transcribe done 1/3 2026-07-20 11:46:42
summarize done 1/3 2026-07-20 11:47:03
embed done 1/3 2026-07-20 11:47:06

📄 Описание YouTube

Показать
📟 Mission Control: 
https://agentsystem.dev

🎓 Agentic Jumpstart Course:
https://agenticjumpstart.com?utm=ytd