← Университет

Автономные кодинг-агенты: архитектура, циклы самопроверки и ночная разработка

Введение

К 2026 году автономные AI-агенты для кодирования эволюционировали из простых помощников в полноценные системы, способные решать комплексные инженерные задачи без постоянного человеческого надзора. Три платформы вышли на лидирующие позиции: Claude Code (Anthropic), Devin (Cognition AI) и OpenHands (open-source). Параллельно развивались системы самопроверки, циклы верификации и интеграция в git-workflow через GitHub Agentic Workflows. Эта архитектура позволила агентам работать ночью, запускаться по расписанию и автоматизировать массовые разработческие задачи.

Архитектура Claude Code: шесть примитивов расширяемости

Claude Code функционирует как аgentic-инструмент Anthropic, пересекающий терминал, desktop и IDE-среды. Согласно руководству 2026 года, система строится на шести ключевых примитивах:

1. CLAUDE.md — конституция репозитория

Файл CLAUDE.md служит якорем для конвенций проекта, определяя поведение агента, стили кодирования, архитектурные принципы и требования безопасности. Это единственный документ, который agent читает при каждом запуске, создавая "долговременную память" о стандартах проекта.

2. Skills — переиспользуемые рабочие потоки

Skills упаковывают доменную логику в файлы .claude/skills/ и могут вызываться автономно. Ключевое преимущество: skills загружаются только при вызове, экономя контекст и токены. Это превращает Claude Code в programmable-платформу вместо простого чат-интерфейса. Примеры: skill для автоматизированной review, skill для рефакторинга, skill для security-анализа.

3. Subagents — изолированные специализированные рабочие

Три встроенных типа субагентов: - Explore: ограниченный доступ только к чтению файлов и выполнению bash-команд - Plan: создание пошаговых планов без модификации кода - General-purpose: полный доступ к инструментам для сложных задач

Каждый субагент имеет выделенное окно контекста, что позволяет параллельно выполнять задачи без перекрёстных помех.

4. Slash commands — типизированные сокращения

Встроенные команды вроде /compact, /review, /security-review предоставляют быстрый доступ к частым операциям. Это аналог макросов в IDE, но интегрированных в агент.

5. Hooks — детерминированное управление жизненным циклом

Hooks — это не промпты, а исполняемые скрипты в 25 точках жизненного цикла агента. Как указывается в документации: "Unlike prompts, which rely on the model's interpretation, hooks execute deterministic code. They cannot hallucinate." (Hooks не могут галлюцинировать, в отличие от промптов.)

Особенно важен PreToolUse hook — эта точка срабатывает перед любым вызовом инструмента, позволяя реализовать security-checkpoint: проверить разрешения, логировать операции, блокировать опасные действия.

Коды выхода определяют, может ли действие продолжиться или оно блокируется.

6. MCP servers — интеграция внешних систем

Model Context Protocol (MCP) соединения к GitHub, базам данных, браузерам и другим инструментам. MCP-серверы становятся first-class citizens агента, их JSON-схемы автоматически транслируются в Action-модели.

Devin: архитектура specialized-моделей

Devin (Cognition AI) отличается составной архитектурой из специализированных моделей:

Ключевая особенность: self-correcting code. Если тесты падают, Devin не переходит к следующей задаче, а автоматически исправляет ошибку. Это создаёт замкнутый контур обратной связи.

Ценообразование Devin (2026)

API: $5.00 за 1M input-токенов, $15.00 за 1M output-токенов, $0.10 за compute-минуту.

Несмотря на автономность, human-oversight остаётся essential для архитектурных решений.

OpenHands: модульная архитектура V1 для production

OpenHands V1 (64k+ stars на GitHub) переходит от монолитной системы к четырём decoupled Python-пакетам:

openhands.sdk         — Core abstractions (Agent, Conversation, LLM, Tool)
openhands.tools       — Concrete tool implementations
openhands.workspace   — Execution environments (local, Docker, hosted APIs)
openhands.agent_server — REST/WebSocket API for remote execution

Ключевые принципы

  1. Optional Isolation: sandboxing opt-in, агенты по умолчанию работают локально
  2. Stateless Components, Single State Source: все компоненты immutable, единый ConversationState хранит mutable контекст
  3. Strict Separation of Concerns: исследовательский и production-код не смешиваются
  4. Two-Layer Composability: разработчики расширяют SDK через typed components

Event-Sourced State Management

Взаимодействия трактуются как immutable events, appended в лог. Это даёт: - Deterministic replay - Strong consistency - Reliable session recovery

Multi-LLM Support

Единая LLM-абстракция поддерживает 100+ провайдеров через LiteLLM. Native-support для reasoning-моделей (Anthropic extended thinking, OpenAI reasoning), multi-LLM routing через RouterLLM.

Benchmark Performance (Claude Sonnet 4.5)

Три-уровневое тестирование: programmatic tests, LLM-based integration tests, benchmark evaluations. Стоимость: $0.5–$3 за run, время: < 5 минут.

Циклы самопроверки: Verifier Pattern и Agent-as-Critic

Проблема same-model review

Same-model самопроверка неэффективна: "Any mistake made during generation is likely to persist through review — because the reviewer thinks the same way as the writer." (Любая ошибка при генерации persists в review, потому что reviewer думает как писатель.)

Решение: independent verification agent, получающий только артефакт и исходные требования, без контекста генератора.

Структура эффективной верификации

  1. Specific criteria, не "find bugs", а конкретные чек-листы
  2. Structured output: JSON с verdict, issues, severity-ratings
  3. Hard iteration limits: типично 3–5 loop'ов с defined escalation-paths
  4. Optional model diversity: different model families для генерации и verify

Практический пример: GitHub Agentic Workflows

GitHub в 2026 ввёл Agentic Workflows — интент-driven автоматизация в GitHub Actions, описанная на Markdown:

Шесть категорий автоматизации: 1. Continuous Triage — автоматическая summary, labeling, routing issues 2. Continuous Documentation — синхронизация README с изменениями кода 3. Continuous Code Simplification — find improvements, open PRs 4. Continuous Test Improvement — assess coverage, add tests 5. Continuous Quality Hygiene — investigate CI failures, propose fixes 6. Continuous Reporting — регулярные health-reports

Security: "Workflows run with read-only permissions by default. Write operations require explicit approval through safe outputs." (Workflows работают с read-only по умолчанию, write требует explicit approval.)

Pull requests никогда не мёржятся автоматически — human review обязателен.

Ночная работа без человека: scheduling и unattended automation

Три подхода для 24/7 execution

1. Claude Code with Cron

Самый прямой способ для technical-пользователей. Флаг --print создаёт non-interactive-скрипт, исполняемый Claude Code без ожидания input:

claude -p "Run daily report generation" --cron "0 2 * * *"

Преимущества: простота для single-step-задач. Недостаток: требует own-server infrastructure.

2. Hermes Orchestration

Для complex multi-agent pipelines с retry-logic и dependencies: - Task queues - Retry logic с exponential backoff - Run-history tracking - Dependencies между tasks

3. Cloud-Native Platforms

MindStudio, GitHub Agentic Workflows и подобные сервисы предоставляют managed execution environments с: - Built-in integrations - Logging и alerting - Web-based interfaces - Automatic scaling

Critical Safety Considerations

Unsupervised агенты требуют строгих safeguards:

Как отмечается в MindStudio guide: "The greatest risk is a silent failure — an agent that runs, doesn't produce an error, but generates incorrect output."

ProofShot: визуальная верификация агента

ProofShot — open-source CLI-tool для visual verification работы агента. Функционирует как "give AI coding agents eyes":

Отличается от browser-control-tools (Playwright MCP, DevTools MCP) тем, что функционирует как verification layer, не как automation-tool. Синхронизирует видео с логами, предоставляет interactive HTML-viewers.

Agent-agnostic: работает с Claude Code, Cursor, Codex, OpenCode, Gemini CLI, Windsurf, GitHub Copilot через skill-установку.

Git-Workflow интеграция

Headless claude -p mode

Anthropic предоставляет headless CLI для программного доступа:

claude -p "Your instruction" --model claude-opus --output json

Это позволяет: - Запускать агентов из CI/CD-pipeline'ов - Передавать structured-input через JSON - Парсить structured-output для downstream-processing - Интегрировать в git-hooks (pre-commit, post-merge)

GitHub Actions Integration

Типичный workflow для continuous-code-improvement:

name: Agentic Code Review
on:
  pull_request:

jobs:
  review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
      - run: |
          claude-code \
            --check-pr \
            --run-tests \
            --suggest-improvements \
            --output format=json

Agent: 1. Читает diff PR 2. Запускает тесты 3. Анализирует код-style и безопасность 4. Открывает комментарий с suggestions 5. Не мёржит автоматически

Atomic Commits и Rollback

Для ночной work production-safety требует: - Atomicity: каждый commit — self-contained changeset - Revertability: git-history позволяет быстро откатиться - Branch-protection: main/master protected от direct agent-pushes - Approval gates: release-branch требует human approval

Параллелизм и масштабирование

Subagent Parallelization в Claude Code

Можно запустить multiple subagents параллельно:

parallel_subagents:
  - type: explore
    task: "Analyze codebase architecture"
  - type: explore
    task: "Run security scan"
  - type: plan
    task: "Create refactoring plan"

Каждый subagent имеет dedicated context window, избегая перекрёстных помех. Результаты агрегируются main-agent'ом.

Cognition Labs (Devin) использует similar-подход, позволяя многим компонентам работать параллельно: planner вырабатывает план, coder пишет код, browser-agent ищет документацию одновременно.

Ценообразование и ROI (2026)

Sticker Pricing

Платформа Модель Pricing Применяемость
Claude Code Integrated с Anthropic API Pay-per-token
Devin Seat + compute-minutes $30/mo Pro, $0.10/compute-min
OpenHands Open-source (бесплатно) Self-hosted или managed
GitHub Agentic Workflows Per-workflow usage Variable, included в GitHub Pro

ROI для типичной компании

Внедрение automated code review + test generation + documentation обычно даёт: - 40% reduction в code-review time - 60% faster bug-detection - 50% improvement в test-coverage на новый код - ROI break-even: 2–3 месяца для enterprise-teams

Ключевые вызовы и лучшие практики

1. Hallucinations и confidence calibration

AI-агенты могут генерировать confident-looking, но неправильный код. Решение: - Verifier-pattern с independent agent - Test-driven development: агент пишет tests, потом код - Human-in-the-loop для architectural decisions

2. Context Window Limitations

Даже 200K-token context-windows ограничены для больших кодбаз. Решение: - Hierarchical memory: CLAUDE.md + indexed symbols - Subagents для работы с isolated modules - Semantic-search через embeddings

3. Reproducibility и Debugging

Unattended overnight-runs могут fail неожиданно. Решение: - Event-sourced state (как в OpenHands V1) - Deterministic replay для debug - Comprehensive logging в structured format (JSON)

4. Security и Supply Chain

Autonomous-агент с git-access — потенциальный security-риск. Best practices: - Least-privilege permissions - Code signing: требовать GPG-signature от агента - Sandboxed execution: Docker containers per task - Audit trails: immutable logs всех agent-действий

Конвергенция архитектуры

Интересное наблюдение из Medium-статьи Dave Patten: "The industry seems to have collectively discovered the core ingredients required to make agents useful for real development work."

Несмотря на разные подходы (CLI-first Claude Code, IDE-native Cursor, cloud-native Devin), все платформы конвергируют к: - Repository memory files (CLAUDE.md, AGENTS.md) - Direct tool integration (git, test-runners, shell) - Sub-agent specialization - Long-running execution loops для multi-step problem solving

Это suggests что fundamental-архитектура стабилизировалась. Дифференциация now происходит в: - Memory systems (how agents remember project context) - Orchestration frameworks (how to compose multiple agents) - Ecosystem integrations (GitHub, AWS, Vercel и т.д.)

Будущее: control centers для AI-инженеров

Как предполагается в research, development-environment будущего может функционировать как "control center for managing autonomous engineering agents".

Вместо IDE как инструмента разработки, IDE становится supervisory-системой: - Agents работают асинхронно в фоне - Developer видит результаты, approves/rejects changes - System управляет multi-agent orchestration - Human остаётся decision-maker для архитектуры и priorities

Это трансформирует роль человека-разработчика от "code-writer" к "architect-and-reviewer", потенциально multiplying productivity на порядок для routine-задач.

Выводы

К 2026 году автономные кодинг-агенты прошли путь от экспериментов к production-ready-системам. Claude Code, Devin и OpenHands демонстрируют, что core-архитектура стабилизировалась вокруг:

  1. Модульных, расширяемых примитивов (skills, hooks, subagents)
  2. Specialized-компонентов (planner, coder, critic)
  3. Independent verification-loops, предотвращающих systemic-errors
  4. Scheduled execution и unattended automation с safety-guardrails
  5. Git-integrated workflows в CI/CD-pipelines

Verifier-pattern, ProofShot-like visual-verification и GitHub Agentic Workflows создали ecosystem, где агенты могут работать 24/7 с predictable, auditable-результатами.

Следующий фронтир — улучшение reproducibility, расширение context-windows для больших кодбаз и deeper human-agent collaboration для architectural-decisions.


Источники и ссылки

  1. MarkTechPost (June 2026): "Claude Code Guide 2026: 25 Features with Examples + Demo" https://www.marktechpost.com/2026/06/14/claude-code-guide-2026-25-features-with-examples-demo/

  2. Anthropic: "Claude Code by Anthropic | AI Coding Agent, Terminal, IDE" https://claude.com/product/claude-code

  3. arXiv: "Dive into Claude Code: The Design Space of Today's and Future AI Agent Systems" https://arxiv.org/html/2604.14228v1

  4. CloudZero (2026): "Claude Code Agents In 2026: Agent View, Subagents, Teams, And What Parallel Sessions Actually Cost" https://www.cloudzero.com/blog/claude-code-agents/

  5. CometAPI (2026): "Claude Code 2026: What Model Powers Anthropic's Agentic Coding Agent?" https://www.cometapi.com/what-model-does-claude-code-use/

  6. InfoQ (May 2026): "Anthropic's Code with Claude Announces Managed Agents, Proactive Workflows" https://www.infoq.com/news/2026/05/code-with-claude/

  7. Medium — Dave Patten: "The State of AI Coding Agents (2026): From Pair Programming to Autonomous AI Teams" https://medium.com/@dave-patten/the-state-of-ai-coding-agents-2026-from-pair-programming-to-autonomous-ai-teams-b11f2b39232a

  8. OfoxAI (2026): "Claude Code: Hooks, Subagents & Skills Complete Guide" https://ofox.ai/blog/claude-code-hooks-subagents-skills-complete-guide-2026/

  9. BoringBot Substack: "Claude Code: Skills, Subagents, Hooks, Plugins, and Harnesses for Production Multi-Agent Workflows" https://boringbot.substack.com/p/claude-code-skills-subagents-hooks

  10. Kunal Ganglani: "Loop Engineering: Build Agent Loops in Claude Code [2026]" https://www.kunalganglani.com/blog/loop-engineering-agent-loops

  11. Samuel Lawrentz: "Claude Code Hooks and Subagents - The Advanced Stuff" https://samuellawrentz.com/blog/claude-code-hooks-subagents/

  12. Claude Code Docs: "Create custom subagents" https://code.claude.com/docs/en/sub-agents

  13. Medium — Shashank Mishra: "Claude Code Skills, Subagents, Hooks and Plugins — A Practical Overview" https://medium.com/@mishra.shashank35/claude-code-skills-subagents-hooks-and-plugins-a-practical-overview-572de7cedb20

  14. GenAI Unplugged Substack: "Claude Code Tutorial - Skills, Commands, Hooks & Agents Guide" https://genaiunplugged.substack.com/p/claude-code-skills-commands-hooks-agents

  15. Blake Crosley: "Claude Code CLI: The Complete Guide — Hooks, MCP, Skills" https://blakecrosley.com/guides/claude-code

  16. AIToolsDevPro (2026): "Devin AI Guide 2026: Features, Pricing, How to Use & Complete Review" https://aitoolsdevpro.com/ai-tools/devin-guide/

  17. Idlen (2026): "Devin, the AI Engineer: Review, Testing & Limitations in 2026" https://www.idlen.io/blog/devin-ai-engineer-review-limits-2026/

  18. Devin Docs: "2026 Release Notes" https://docs.devin.ai/release-notes/2026

  19. CalmOps: "AI Coding Agents and Devin 2026: The Complete Guide" https://calmops.com/ai/ai-coding-agents-devin-2026-complete-guide/

  20. TechTimes (May 2026): "AI Coding Agents: Cognition's $26B Raise Bets Agent-First Architecture Beats IDE Tools" https://www.techtimes.com/articles/317354/20260529/ai-coding-agents-cognitions-26b-raise-bets-agent-first-architecture-beats-ide-tools.htm

  21. Devin Official: "Devin | The AI Software Engineer" https://devin.ai/

  22. MarkTechPost (June 2026): "Top AI Coding Agents and Development Platforms in 2026" https://www.marktechpost.com/2026/06/10/ai-coding-agents-development-platforms-2026/

  23. SingularityMoments: "Devin AI Guide 2026 — Cognition Labs' Autonomous Software Engineer" https://singularitymoments.com/devin-ai-coding-agent-guide/

  24. OpenHands Official: "OpenHands | The Open Platform for Cloud Coding Agents" https://www.openhands.dev/

  25. GitHub OpenHands: "OpenHands: AI-Driven Development" https://github.com/OpenHands/OpenHands

  26. OpenHands Product: "Autonomous Cloud Coding Agents" https://www.openhands.dev/product

  27. OpenHands Enterprise: "Secure, Scalable Agentic Software Development" https://www.openhands.dev/enterprise

  28. Medium — Niar: "Redefining Dev Workflows: Exploring OpenHands" https://medium.com/@niarsdet/redefining-dev-workflows-exploring-openhands-an-open-source-ai-developer-agent-4d579c6e5f40

  29. arXiv: "The OpenHands Software Agent SDK: A Composable and Extensible Foundation for Production Agents" https://arxiv.org/html/2511.03690v1

  30. MindStudio (2026): "How to Build an AI Agent That Runs While You Sleep: Scheduled Automations with Claude" https://www.mindstudio.ai/blog/ai-agent-runs-while-you-sleep-scheduled-automations-claude

  31. Medium — Write A Catalyst: "Your AI Just Clocked In for the Night Shift" https://medium.com/write-a-catalyst/your-ai-just-clocked-in-for-the-night-shift-without-being-asked-5b454d93cd77

  32. MindStudio (2026): "How to Build an AI Agent That Runs Overnight: A Practical Guide" https://www.mindstudio.ai/blog/build-ai-agent-runs-overnight

  33. Amux: "The Complete Guide to Running AI Coding Agents Overnight" https://amux.io/guides/ai-coding-agents-overnight/

  34. MindStudio (2026): "How to Build a No-Code AI Agent That Runs 24/7 Without a Developer" https://www.mindstudio.ai/blog/build-no-code-ai-agent-runs-24-7

  35. Forbes (March 2026): "AI Agents Run Experiments While You Sleep, So What Should Knowledge Workers Do?" https://www.forbes.com/sites/josipamajic/2026/03/19/ai-agents-run-experiments-while-you-sleep-so-what-should-knowledge-workers-do/

  36. DEV Community: "How I Built 9 Autonomous AI Agents That Run 24/7" https://dev.to/quantbit/how-i-built-9-autonomous-ai-agents-that-run-24-7-46hl

  37. Medium — Brian Fischman: "I Tried to Run an AI Coding Agent Overnight. Here's What Actually Happened." https://brianfischman.medium.com/i-tried-to-run-an-ai-coding-agent-overnight-heres-what-actually-happened-f97288b7be35

  38. SoftwareSeni: "How to Run AI Coding Agents Unattended Without Risking Your Production Systems" https://www.softwareseni.com/how-to-run-ai-coding-agents-unattended-without-risking-your-production-systems/

  39. GitHub Blog — AI & ML: "Automate repository tasks with GitHub Agentic Workflows" https://github.blog/ai-and-ml/automate-repository-tasks-with-github-agentic-workflows/

  40. GitHub Agentic Workflows Home: "GitHub Agentic Workflows" https://github.github.com/gh-aw/

  41. GitHub Next: "Continuous AI" https://githubnext.com/projects/continuous-ai/

  42. Agent CI Docs: "Continuous Integration (CI/CD)" https://agent-ci.com/docs/core-concepts/cicd/

  43. The New Stack (2026): "GitHub's Agentic Workflows bring 'continuous AI' into the CI/CD loop" https://thenewstack.io/github-agentic-workflows-overview/

  44. Medium — Micheal Lanham: "GitHub Just Made AI Agents Part of CI/CD" https://medium.com/@Micheal-Lanham/github-just-made-ai-agents-part-of-ci-cd-heres-how-to-build-your-first-agentic-workflow-d6f7d9fe62ff

  45. GitHub Next: "Awesome Continuous AI" https://github.com/githubnext/awesome-continuous-ai

  46. InfoQ (February 2026): "GitHub Agentic Workflows Unleash AI-Driven Repository Automation" https://www.infoq.com/news/2026/02/github-agentic-workflows/

  47. AWS Blog: "Deploy AI agents on Amazon Bedrock AgentCore using GitHub Actions" https://aws.amazon.com/blogs/machine-learning/deploy-ai-agents-on-amazon-bedrock-agentcore-using-github-actions/

  48. GitHub Blog — AI & ML: "Continuous AI in practice: What developers can automate today with agentic CI" https://github.blog/ai-and-ml/generative-ai/continuous-ai-in-practice-what-developers-can-automate-today-with-agentic-ci/

  49. MindStudio (2026): "How to Set Up Automated Code Review with Multiple AI Agents" https://www.mindstudio.ai/blog/automated-code-review-multiple-ai-agents

  50. ASDLC: "Adversarial Code Review" https://asdlc.io/patterns/adversarial-code-review/

  51. ProC Link: "Autonomous Code Review Agent" https://proclink.com/products/accelerators/autonomous-code-review-agent/

  52. arXiv: "CodeAgent: Autonomous Communicative Agents for Code Review" https://arxiv.org/html/2402.02172v4

  53. Nandann Creative Agency: "Agentic CI Pipelines: Autonomous Code Review & Testing Tutorial" https://www.nandann.com/blog/agentic-ci-pipelines-autonomous-code-review-testing

  54. Critique.sh: "Critique — Automated Code Verification & AI Code Review for GitHub PRs" https://www.critique.sh/

  55. Zylos Research (April 2026): "Autonomous Code Review: Multi-Agent Approaches to Pull Request Analysis" https://zylos.ai/research/2026-04-22-autonomous-code-review-multi-agent-pr-analysis/

  56. Emergent Mind: "Critique Agent: Modular Feedback System" https://www.emergentmind.com/topics/critique-agent

  57. MCP Market: "Critic: AI Self-Review & Audit Skill for Claude Code" https://mcpmarket.com/tools/skills/critic-ai-self-review-auditor

  58. MindStudio (2026): "What Is the Verifier Pattern in Multi-Agent Systems?" https://www.mindstudio.ai/blog/verifier-pattern-multi-agent-systems-independent-review

  59. GitHub: "AmElmo/proofshot — Give AI coding agents eyes" https://github.com/AmElmo/proofshot

  60. TestSprite: "Automated Visual Testing via AI agent" https://www.testsprite.com/use-cases/en/automated-visual-testing

  61. QA.tech: "Visual Testing with Agents | Catch UI Bugs Early" https://qa.tech/blog/visual-testing-with-agents-how-to-catch-ui-bugs-before-your-users-do

  62. TestMu AI: "What is Visual Testing AI Agent: Intelligent UI Validation with AI" https://www.testmuai.com/blog/visual-testing-ai-agent/

  63. AutonomyAI: "Building a QA Workflow with AI Agents to Catch UI Regressions" https://autonomyai.io/technology/building-a-qa-workflow-with-ai-agents-to-catch-ui-regressions/

  64. BrowserStack: "Automated Visual AI Testing" https://www.browserstack.com/guide/visual-ai-testing

  65. LinkedIn — Ajay Kulkarni: "Visual Testing AI Agent — Intelligent Automation" https://www.linkedin.com/pulse/visual-testing-ai-agent-intelligent-automation-user-ajay-kulkarni-hhdnf

  66. Functionize: "Visual Testing - Automated Visual Regression Testing" https://www.functionize.com/visual-testing

  67. Paddo Dev: "Visual Verification: Making Agents Prove Their Work" https://paddo.dev/blog/multimodal-validation-visual-verification/

  68. Screenata: "AI Agents for Compliance: From Manual Evidence to Autonomous Verification Systems" https://screenata.com/resources/blog/how-to-automate-soc-2-evidence-collection-with-ai-agents-and-screenshots