본문 바로가기
C.W.K.
Stream
Lesson 10 of 11 · published

Codex 하위 에이전트 활용하기

~12 min · codex, subagents, delegation

Level 0🌱 입문자
0 XP0/70 lessons0/11 achievements
0/120 XP to next level120 XP to go0% complete

반복되는 전문 작업은 이름 붙인 하위 에이전트에게 맡겨

Codex의 실험적 하위 에이전트 기능은 역할과 범위를 정한 작업자를 주 세션 아래에 둬. YAML 머리말을 가진 Markdown 파일에 역할, 도구 허용 목록, 시스템 지침을 적고 프로젝트 .codex/agents/나 사용자 전역 폴더에 저장해.

features.sub_agents = true를 켜면 주 Codex가 "security-reviewer로 src/auth.ts를 감사해" 같은 자연어 지시로 해당 에이전트에게 넘길 수 있어. 읽기 전용 작업자라면 허용 목록뿐 아니라 Edit와 Write를 금지 목록에도 넣어 상속 변화에도 경계를 지켜.

2026년 초 기준으로 이 기능은 아직 실험적이므로 설정과 동작이 바뀔 가능성도 함께 감수해야 해.

직접 확인할 항목: config.toml, ~/.codex/agents/.

Code

읽기 전용 보안 하위 에이전트·markdown
---
name: security-reviewer
description: |
  Security-focused review. Auto-delegated when the user asks
  about security, vulnerabilities, auth, or data handling.
model: gpt-5-codex
tools:
  - Read
  - Grep
  - Glob
tool_denylist:
  - Edit
  - Write
  - Bash
---

You are a senior application security engineer. Audit only, never
modify. Always cite the CWE class. Format findings as:
[SEVERITY] desc (file:line) — CWE-XXX
기능을 켜고 사용하기·toml
# ~/.codex/config.toml
[features]
sub_agents = true

# In a session:
# "Use the security-reviewer to audit src/auth.ts and
#  the perf-reviewer to scan src/db/."

Exercise

반복해서 수행하는 범위가 분명한 작업 하나를 골라 Codex 하위 에이전트를 정의해. 설정에서 하위 에이전트 기능을 켠 뒤, 주 에이전트 Codex에게 자연어로 위임해 봐. 문맥이 분리된 방식이 단일 에이전트 실행과 어떻게 다르게 느껴지는지 적어.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.