Search

Search through articles and snippets by title, tags, or content.

Back to Articles
AI 에이전트의 한계를 넘는 방법: Anthropic이 제안하는 '하네스(Harness)' 설계 전략
AIAI-AgentAnthropicClaude

AI 에이전트의 한계를 넘는 방법: Anthropic이 제안하는 '하네스(Harness)' 설계 전략

단일 세션의 한계를 넘어 장시간 자율적으로 동작하는 코딩 에이전트를 만드는 핵심 기술, '하네스' 설계 노하우를 공개합니다.

D
DevBlog
Mar 28, 2026
6 min read

들어가며: 모델의 지능만큼 중요한 '시스템의 구조'

최근 AI 에이전트 기술이 급격히 발전하면서, 단순히 코드 한 줄을 완성하는 수준을 넘어 '장시간 스스로 작동하는(Long-running)' 에이전트에 대한 수요가 높아지고 있습니다. 하지만 아무리 뛰어난 모델(Claude 3.5나 그 이상)이라도 단일 컨텍스트 안에서 거대한 앱 전체를 빌드하려고 하면 결국 한계에 부딪히게 됩니다.

Anthropic은 최근 엔지니어링 블로그를 통해 이를 해결하기 위한 솔루션으로 '하네스(Harness) 설계' 의 중요성을 강조했습니다. 모델의 추론 능력을 극대화하고, 작업의 연속성을 보장하는 이 시스템 설계법이 왜 중요한지 핵심 내용을 정리해 드립니다.


1. 장시간 실행되는 에이전트의 고질적인 문제

단순한 프롬프트 엔지니어링만으로 에이전트를 돌릴 때 발생하는 대표적인 병목 현상은 다음과 같습니다.

  • 컨텍스트 윈도우의 피로도: 세션이 길어질수록 불필요한 정보가 쌓여 모델의 주의력이 분산됩니다.
  • 상태 보존의 어려움: 세션이 끊기면 이전까지 수행한 작업의 맥락을 잃어버립니다.
  • 일관성 부족: 전체적인 디자인 시스템이나 아키텍처를 유지하지 못하고 파편화된 결과를 내놓습니다.

2. Anthropic의 솔루션: 이분화된 에이전트 구조

Anthropic은 작업을 안정적으로 완수하기 위해 에이전트의 역할을 두 가지로 분리하는 '하네스' 구조를 제안합니다.

① 초기화 에이전트 (Initializer Agent)

첫 실행 시 환경을 설정하는 전담 에이전트입니다.

  • init.sh 스크립트 작성
  • claude-progress.txt와 같은 진행 로그 파일 생성
  • 초기 Git 커밋 등을 통해 작업의 기준점(Baseline) 을 명확히 정의합니다.

② 코딩 에이전트 (Coding Agent)

초기화된 환경 위에서 실제 기능을 구현합니다.

  • 한 번에 하나의 기능(Feature)에만 집중합니다.
  • 세션이 종료될 때마다 구조화된 아티팩트(Artifacts) 를 남겨 다음 세션에 컨텍적스를 전달합니다.
  • "컨텍스트 리셋"을 주기적으로 수행하여 모델의 성능 저하를 방지합니다.

3. 핵심 전략: '구조화된 아티팩트'와 '계층적 평가'

단순히 코드를 짜는 것을 넘어, Anthropic은 품질을 유지하기 위한 구체적인 가이드라인을 하네스에 포함시켰습니다.

품질을 결정하는 4가지 평가 기준

에이전트가 스스로 결과물을 검토할 때 사용하는 기준입니다.

  1. 디자인 품질 (Design Quality): 개별 컴포넌트의 합이 아닌, 하나의 일관된 분위기를 형성하는가?
  2. 독창성 (Originality): 뻔한 템플릿이나 AI 특유의 패턴(보라색 그라데이션 등)을 벗어나 맞춤형 선택을 했는가?
  3. 기술적 숙련도 (Craft): 타이포그래피, 여백, 대비 등 기초적인 UI 원칙을 준수했는가?
  4. 일관성 (Coherence): 세션이 바뀌어도 전체 아키텍처가 유지되는가?

코드 예시: 진행 상황 기록 (Conceptual)

에이전트는 매 세션마다 아래와 유사한 로그를 남겨 다음 '나'에게 정보를 전달합니다.

# claude-progress.txt 예시
- [DONE] 초기 프로젝트 구조 및 Tailwind 설정
- [IN_PROGRESS] 메인 대시보드 차트 컴포넌트 구현 중
- [TODO] 사용자 프로필 설정 페이지 추가
- [ISSUE] API 응답 데이터 타입 정의 필요

4. 하네스 설계가 가져온 변화

Anthropic의 실험 결과, 모델 자체를 업그레이드하는 것보다 적절한 하네스를 설계했을 때 벤치마크 점수가 비약적으로 상승 하는 것을 확인했습니다.

  • 효율적인 컨텍스트 관리: 무거운 히스토리를 들고 가는 대신, 핵심 요약(Summary)과 현재 작업 파일만 전달하여 추론 정확도를 높였습니다.
  • 자율성 강화: 인간의 개입 없이도 수십 개의 세션을 이어가며 복잡한 앱을 완성할 수 있게 되었습니다.

마치며: 이제는 '하네스 엔지니어링'의 시대

이제 개발자의 역할은 단순히 코드를 직접 작성하는 것을 넘어, AI가 잘 달릴 수 있는 안전하고 견고한 '트랙(하네스)'을 설계하는 것 으로 확장되고 있습니다. 모델의 성능이 상향 평준화될수록, 이를 어떻게 오케스트레이션 하느냐가 진정한 기술적 해자가 될 것입니다.

여러분의 프로젝트에도 단순한 챗봇을 넘어, 스스로 일감을 처리하는 '장기 실행 에이전트'를 도입해 보시는 건 어떨까요?


Appendix

Example plan generated by planner agent.

RetroForge - 2D Retro Game Maker
 
Overview
RetroForge is a web-based creative studio for designing and building 2D retro-style video games.
It combines the nostalgic charm of classic 8-bit and 16-bit game aesthetics with modern,
intuitive editing tools—enabling anyone from hobbyist creators to indie developers
to bring their game ideas to life without writing traditional code.
 
The platform provides four integrated creative modules: a tile-based Level Editor
for designing game worlds, a pixel-art Sprite Editor for crafting visual assets,
a visual Entity Behavior system for defining game logic,
and an instant Playable Test Mode for real-time gameplay testing.
By weaving AI assistance throughout (powered by Claude),
RetroForge accelerates the creative process—helping users generate sprites,
design levels, and configure behaviors through natural language interaction.
 
RetroForge targets creators who love retro gaming aesthetics but want modern conveniences.
Whether recreating the platformers, RPGs, or action games of their childhood,
or inventing entirely new experiences within retro constraints, users can prototype rapidly,
iterate visually, and share their creations with others.
 
Features
 
1. Project Dashboard & Management
   The Project Dashboard is the home base for all creative work in RetroForge.
   Users need a clear, organized way to manage their game projects—creating new ones,
   returning to works-in-progress, and understanding what each project contains at a glance.
 
User Stories: As a user, I want to:
 
- Create a new game project with a name and description, so that I can begin designing my game
- See all my existing projects displayed as visual cards showing the project name,
  last modified date, and a thumbnail preview, so that I can quickly find and continue my work
- Open any project to enter the full game editor workspace, so that I can work on my game
- Delete projects I no longer need, with a confirmation dialog to prevent accidents,
  so that I can keep my workspace organized
- Duplicate an existing project as a starting point for a new game,
  so that I can reuse my previous work
 
Project Data Model: Each project contains:
 
Project metadata (name, description, created/modified timestamps)
Canvas settings (resolution: e.g., 256x224, 320x240, or 160x144)
Tile size configuration (8x8, 16x16, or 32x32 pixels)
Color palette selection
All associated sprites, tilesets, levels, and entity definitions

출처: https://www.anthropic.com/engineering/harness-design-long-running-apps

Comments