β–  Overview κ°œμš”

Team Mode provides multi-worker coordination with bounded batch execution, task lifecycle tracking, and synthesized results. The leader agent decomposes a goal into discrete worker tasks, executes them with concurrency control, and merges outputs into a unified summary.

νŒ€ λͺ¨λ“œλŠ” 닀쀑 μ›Œμ»€ 쑰정을 μ œκ³΅ν•©λ‹ˆλ‹€. μ œν•œλœ 배치 μ‹€ν–‰, νƒœμŠ€ν¬ 생λͺ…μ£ΌκΈ° 좔적, μ’…ν•© κ²°κ³Όλ₯Ό μ§€μ›ν•©λ‹ˆλ‹€. 리더 μ—μ΄μ „νŠΈκ°€ λͺ©ν‘œλ₯Ό κ°œλ³„ μ›Œμ»€ νƒœμŠ€ν¬λ‘œ λΆ„ν•΄ν•˜κ³ , λ™μ‹œμ„± μ œμ–΄λ‘œ μ‹€ν–‰ν•œ ν›„ 좜λ ₯을 톡합 μš”μ•½μœΌλ‘œ λ³‘ν•©ν•©λ‹ˆλ‹€.

Supports two execution backends: native subprocesses for fast headless operation, or tmux panes for human-readable, observable worker output. Workers receive strict guardrails that prevent recursive orchestration and scope creep.

두 κ°€μ§€ μ‹€ν–‰ λ°±μ—”λ“œλ₯Ό μ§€μ›ν•©λ‹ˆλ‹€: λΉ λ₯Έ ν—€λ“œλ¦¬μŠ€ λ™μž‘μ„ μœ„ν•œ λ„€μ΄ν‹°λΈŒ μ„œλΈŒν”„λ‘œμ„ΈμŠ€, λ˜λŠ” μ‚¬λžŒμ΄ 읽을 수 μžˆλŠ” κ΄€μ°° κ°€λŠ₯ν•œ μ›Œμ»€ 좜λ ₯을 μœ„ν•œ tmux 페인. μ›Œμ»€λŠ” μž¬κ·€μ  μ˜€μΌ€μŠ€νŠΈλ ˆμ΄μ…˜κ³Ό λ²”μœ„ ν™•μž₯을 λ°©μ§€ν•˜λŠ” μ—„κ²©ν•œ κ°€λ“œλ ˆμΌμ„ λ°›μŠ΅λ‹ˆλ‹€.

● Worker Protocol ● μ›Œμ»€ ν”„λ‘œν† μ½œ

Workers are instructed not to spawn subagents, delegate to other agents, or run orchestration commands (/team, /ultrawork, etc.). They report changed files, verification performed, and remaining blockers before finishing.

μ›Œμ»€λŠ” μ„œλΈŒμ—μ΄μ „νŠΈ 생성, λ‹€λ₯Έ μ—μ΄μ „νŠΈμ— μœ„μž„, μ˜€μΌ€μŠ€νŠΈλ ˆμ΄μ…˜ λͺ…λ Ή(/team, /ultrawork λ“±) 싀행을 κΈˆμ§€λ°›μŠ΅λ‹ˆλ‹€. μ™„λ£Œ μ „ λ³€κ²½λœ 파일, μˆ˜ν–‰λœ 검증, 남은 λΈ”λ‘œμ»€λ₯Ό λ³΄κ³ ν•©λ‹ˆλ‹€.

● Enabling ν™œμ„±ν™”

Team Mode is opt-in. Set the environment variable before starting pi:

νŒ€ λͺ¨λ“œλŠ” μ˜΅νŠΈμΈμž…λ‹ˆλ‹€. piλ₯Ό μ‹œμž‘ν•˜κΈ° 전에 ν™˜κ²½ λ³€μˆ˜λ₯Ό μ„€μ •ν•˜μ„Έμš”:

PI_ENABLE_TEAM_MODE=1 pi

When enabled, the team tool is registered in the root session only. Inside workers, PI_TEAM_WORKER=1 is automatically set to suppress recursive orchestration β€” workers cannot register the team or subagent tools.

ν™œμ„±ν™”λ˜λ©΄ team 도ꡬ가 루트 μ„Έμ…˜μ—λ§Œ λ“±λ‘λ©λ‹ˆλ‹€. μ›Œμ»€ λ‚΄λΆ€μ—μ„œλŠ” μž¬κ·€μ  μ˜€μΌ€μŠ€νŠΈλ ˆμ΄μ…˜μ„ μ–΅μ œν•˜κΈ° μœ„ν•΄ PI_TEAM_WORKER=1이 μžλ™μœΌλ‘œ μ„€μ •λ©λ‹ˆλ‹€ β€” μ›Œμ»€λŠ” team λ˜λŠ” subagent 도ꡬλ₯Ό 등둝할 수 μ—†μŠ΅λ‹ˆλ‹€.

β–Ά Command Syntax λͺ…λ Ήμ–΄ ꡬ문

The /team slash command accepts a goal and optional key-value parameters:

/team μŠ¬λž˜μ‹œ λͺ…령은 λͺ©ν‘œμ™€ 선택적 ν‚€-κ°’ λ§€κ°œλ³€μˆ˜λ₯Ό λ°›μŠ΅λ‹ˆλ‹€:

# Launch a new team run /team goal="Refactor auth module to use JWT" \ agent=worker \ backend=auto \ worker-count=3 \ worktree-policy=auto \ max-output=6000 # Resume an existing run with a follow-up message /team resume=team-a1b2c3d4e5f6 \ command=worker-1 \ message="Fix the edge case in token refresh"

Parameters:

λ§€κ°œλ³€μˆ˜:

Parameter Typeνƒ€μž… DefaultκΈ°λ³Έκ°’ Descriptionμ„€λͺ…
goal stringλ¬Έμžμ—΄ β€” Task decomposition goalνƒœμŠ€ν¬ λΆ„ν•΄ λͺ©ν‘œ
agent stringλ¬Έμžμ—΄ worker Agent name for workersμ›Œμ»€μ˜ μ—μ΄μ „νŠΈ 이름
backend auto / native / tmux auto Execution backendμ‹€ν–‰ λ°±μ—”λ“œ
worker-count number (1–12)숫자 (1–12) β€” Number of parallel workers병렬 μ›Œμ»€ 수
worktree-policy off / on / auto off Git worktree isolationGit μ›Œν¬νŠΈλ¦¬ 격리
resume string (runId)λ¬Έμžμ—΄ (runId) β€” Resume an existing runκΈ°μ‘΄ μ‹€ν–‰ 재개
resume-mode mark-interrupted / retry-stale mark-interrupted How to handle stale tasks였래된 νƒœμŠ€ν¬ 처리 방식
max-output number숫자 β€” Max output chars per workerμ›Œμ»€λ‹Ή μ΅œλŒ€ 좜λ ₯ 문자 수

β˜… Backends λ°±μ—”λ“œ

Team Mode supports two execution backends. The auto mode prefers tmux when available and falls back to native.

νŒ€ λͺ¨λ“œλŠ” 두 κ°€μ§€ μ‹€ν–‰ λ°±μ—”λ“œλ₯Ό μ§€μ›ν•©λ‹ˆλ‹€. auto λͺ¨λ“œλŠ” tmuxλ₯Ό μ‚¬μš©ν•  수 있으면 μ„ ν˜Έν•˜κ³ , μ—†μœΌλ©΄ λ„€μ΄ν‹°λΈŒλ‘œ ν΄λ°±ν•©λ‹ˆλ‹€.

Backend Descriptionμ„€λͺ… Use Caseμ‚¬μš© 사둀
auto Tries native, falls back to tmuxλ„€μ΄ν‹°λΈŒλ₯Ό μ‹œλ„ν•˜κ³  tmux둜 폴백 DefaultκΈ°λ³Έκ°’
native Subprocess workersμ„œλΈŒν”„λ‘œμ„ΈμŠ€ μ›Œμ»€ Fast, headlessλΉ λ₯Έ ν—€λ“œλ¦¬μŠ€
tmux Human-readable tmux panesμ‚¬λžŒμ΄ 읽을 수 μžˆλŠ” tmux 페인 Debugging, observable디버깅, κ΄€μ°° κ°€λŠ₯

When backend=native is forced, tmux detection is skipped entirely. When backend=tmux is forced and tmux is unavailable, pane creation fails immediately.

backend=nativeκ°€ κ°•μ œλ˜λ©΄ tmux 감지λ₯Ό μ™„μ „νžˆ κ±΄λ„ˆλœλ‹ˆλ‹€. backend=tmuxκ°€ κ°•μ œλ˜μ—ˆλŠ”λ° tmuxλ₯Ό μ‚¬μš©ν•  수 μ—†μœΌλ©΄ 페인 생성이 μ¦‰μ‹œ μ‹€νŒ¨ν•©λ‹ˆλ‹€.

Tmux panes are created either in the current tmux window (if pi is already inside a tmux client) or in a new detached session. Pane metadata (session, window, pane ID, attach command, log paths) is stored on each task's terminal record.

tmux νŽ˜μΈμ€ ν˜„μž¬ tmux μœˆλ„(piκ°€ 이미 tmux ν΄λΌμ΄μ–ΈνŠΈ 내뢀에 μžˆλŠ” 경우) λ˜λŠ” μƒˆλ‘œμš΄ λ””νƒœμΉ˜λ“œ μ„Έμ…˜μ— μƒμ„±λ©λ‹ˆλ‹€. 페인 메타데이터(μ„Έμ…˜, μœˆλ„, 페인 ID, μ—°κ²° λͺ…λ Ή, 둜그 경둜)λŠ” 각 νƒœμŠ€ν¬μ˜ 터미널 λ ˆμ½”λ“œμ— μ €μž₯λ©λ‹ˆλ‹€.

● Task Lifecycle νƒœμŠ€ν¬ 생λͺ…μ£ΌκΈ°

Team Mode tracks three levels of status:

νŒ€ λͺ¨λ“œλŠ” μ„Έ μˆ˜μ€€μ˜ μƒνƒœλ₯Ό μΆ”μ ν•©λ‹ˆλ‹€:

Task Statuses νƒœμŠ€ν¬ μƒνƒœ

created β†’ pending β†’ in_progress β†’ completed | failed | interrupted β†˜ blocked

Tasks are created during goal decomposition, transition to pending when eligible, and execute through in_progress to a terminal state. The blocked state is reserved for dependency-based scheduling (future).

νƒœμŠ€ν¬λŠ” λͺ©ν‘œ λΆ„ν•΄ 쀑 μƒμ„±λ˜κ³ , μ‹€ν–‰ κ°€λŠ₯ν•΄μ§€λ©΄ pending으둜 μ „ν™˜λ˜λ©°, in_progressλ₯Ό 거쳐 μ’…λ£Œ μƒνƒœλ‘œ μ΄λ™ν•©λ‹ˆλ‹€. blocked μƒνƒœλŠ” μ˜μ‘΄μ„± 기반 μŠ€μΌ€μ€„λ§μš©μœΌλ‘œ μ˜ˆμ•½λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€(ν–₯ν›„).

Run Statuses μ‹€ν–‰ μƒνƒœ

created β†’ running β†’ completed | failed | cancelled | interrupted

The overall run status reflects aggregate worker progress. cancelled and interrupted are triggered by abort signals or Ctrl+C.

전체 μ‹€ν–‰ μƒνƒœλŠ” μ›Œμ»€ μ§„ν–‰ 상황을 μ§‘κ³„ν•˜μ—¬ λ°˜μ˜ν•©λ‹ˆλ‹€. cancelledκ³Ό interruptedλŠ” 쀑단 μ‹œκ·Έλ„μ΄λ‚˜ Ctrl+C에 μ˜ν•΄ νŠΈλ¦¬κ±°λ©λ‹ˆλ‹€.

Command Statuses λͺ…λ Ή μƒνƒœ

queued β†’ acknowledged β†’ started β†’ completed | blocked | failed β†˜ stale

Commands (follow-up messages) use an optimistic concurrency FSM with a statusVersion counter. Terminal statuses can transition back to queued for retry. Retries are capped at 3 attempts β€” exceeding this marks the command blocked.

λͺ…λ Ή(후속 λ©”μ‹œμ§€)은 statusVersion μΉ΄μš΄ν„°κ°€ μžˆλŠ” 낙관적 λ™μ‹œμ„± FSM을 μ‚¬μš©ν•©λ‹ˆλ‹€. μ’…λ£Œ μƒνƒœλŠ” μž¬μ‹œλ„λ₯Ό μœ„ν•΄ queued둜 λ‹€μ‹œ μ „ν™˜ν•  수 μžˆμŠ΅λ‹ˆλ‹€. μž¬μ‹œλ„λŠ” μ΅œλŒ€ 3회둜 μ œν•œλ˜λ©°, μ΄ˆκ³Όν•˜λ©΄ λͺ…령이 blocked둜 ν‘œμ‹œλ©λ‹ˆλ‹€.

β—† State File μƒνƒœ 파일

Every team run persists its state to a durable JSON file. This enables resume, debugging, and audit of past runs.

λͺ¨λ“  νŒ€ 싀행은 μƒνƒœλ₯Ό 내ꡬ성 μžˆλŠ” JSON νŒŒμΌμ— μ €μž₯ν•©λ‹ˆλ‹€. 이λ₯Ό 톡해 재개, 디버깅, κ³Όκ±° μ‹€ν–‰ 감사가 κ°€λŠ₯ν•©λ‹ˆλ‹€.

Schema μŠ€ν‚€λ§ˆ

{ schemaVersion: 1, runId: "team-a1b2c3d4e5f6g7h8", goal: "...", createdAt: "2026-04-28T10:00:00.000Z", // ISO 8601 updatedAt: "2026-04-28T10:05:30.000Z", status: "completed", // TeamRunStatus options: { ... }, // TeamRunOptionsSnapshot tasks: [ TeamTask ], // worker task records commands: [ TeamCommand ], // follow-up command records events: [ TeamRunEvent ], // append-only audit log messages: [ TeamMessage ], // inbox/outbox history summary: { TeamRunSummary } // final synthesized result }

Storage Location μ €μž₯ μœ„μΉ˜

${PI_TEAM_RUN_STATE_ROOT || <cwd>/.pi/agent/runs}/<runId>/team-run.json

Tmux logs are stored alongside the state file when using the tmux backend:

tmux λ°±μ—”λ“œ μ‚¬μš© μ‹œ tmux λ‘œκ·Έκ°€ μƒνƒœ 파일과 ν•¨κ»˜ μ €μž₯λ©λ‹ˆλ‹€:

<runId>/tmux/task-N.log # visible pane log <runId>/tmux/task-N.events.jsonl # raw event log

Writes are atomic β€” the record is written to a temp file first, then renamed.

μ“°κΈ°λŠ” μ›μžμ μž…λ‹ˆλ‹€ β€” λ ˆμ½”λ“œλ₯Ό λ¨Όμ € μž„μ‹œ νŒŒμΌμ— μ“΄ ν›„ 이름을 λ³€κ²½ν•©λ‹ˆλ‹€.

β–Ά Resume & Follow-up 재개 & 후속 λ©”μ‹œμ§€

Interrupted or incomplete runs can be resumed by referencing their runId. Two strategies handle stale tasks:

μ€‘λ‹¨λ˜κ±°λ‚˜ μ™„λ£Œλ˜μ§€ μ•Šμ€ 싀행은 runIdλ₯Ό μ°Έμ‘°ν•˜μ—¬ μž¬κ°œν•  수 μžˆμŠ΅λ‹ˆλ‹€. 두 κ°€μ§€ μ „λž΅μœΌλ‘œ 였래된 νƒœμŠ€ν¬λ₯Ό μ²˜λ¦¬ν•©λ‹ˆλ‹€:

mark-interrupted (default) mark-interrupted (κΈ°λ³Έκ°’)

Marks stale in_progress tasks as interrupted. Stale commands are marked stale. Use this when you want to inspect what was running and decide manually.

였래된 in_progress νƒœμŠ€ν¬λ₯Ό interrupted둜 ν‘œμ‹œν•©λ‹ˆλ‹€. 였래된 λͺ…령은 stale둜 ν‘œμ‹œλ©λ‹ˆλ‹€. μ‹€ν–‰ μ€‘μ΄λ˜ μž‘μ—…μ„ κ²€μ‚¬ν•˜κ³  μˆ˜λ™μœΌλ‘œ κ²°μ •ν•˜λ €λ©΄ 이 μ˜΅μ…˜μ„ μ‚¬μš©ν•˜μ„Έμš”.

retry-stale retry-stale

Resets stale in_progress tasks to pending for re-execution. Stale commands are retried (attempt incremented, reset to queued). Commands exceeding 3 attempts are marked blocked.

였래된 in_progress νƒœμŠ€ν¬λ₯Ό pending으둜 μž¬μ„€μ •ν•˜μ—¬ μž¬μ‹€ν–‰ν•©λ‹ˆλ‹€. 였래된 λͺ…령은 μž¬μ‹œλ„λ©λ‹ˆλ‹€(μ‹œλ„ 횟수 증가, queued둜 μž¬μ„€μ •). 3회λ₯Ό μ΄ˆκ³Όν•œ λͺ…령은 blocked둜 ν‘œμ‹œλ©λ‹ˆλ‹€.

Follow-up Messages 후속 λ©”μ‹œμ§€

Send targeted messages to a specific worker or task in an existing run. The command creates a durable inbox entry, re-executes the worker with the new context, and records the result.

κΈ°μ‘΄ μ‹€ν–‰μ˜ νŠΉμ • μ›Œμ»€λ‚˜ νƒœμŠ€ν¬μ— λŒ€μƒ λ©”μ‹œμ§€λ₯Ό λ³΄λƒ…λ‹ˆλ‹€. λͺ…령은 내ꡬ성 μžˆλŠ” μΈλ°•μŠ€ ν•­λͺ©μ„ μƒμ„±ν•˜κ³ , μƒˆ μ»¨ν…μŠ€νŠΈλ‘œ μ›Œμ»€λ₯Ό μž¬μ‹€ν–‰ν•˜λ©°, κ²°κ³Όλ₯Ό κΈ°λ‘ν•©λ‹ˆλ‹€.

# Send a follow-up to a specific worker /team resume=team-a1b2c3d4e5f6 command=worker-1 \ message="Fix the edge case in token refresh"

The target can be a worker identifier (worker-1) or a task identifier (task-1).

λŒ€μƒμ€ μ›Œμ»€ μ‹λ³„μž(worker-1) λ˜λŠ” νƒœμŠ€ν¬ μ‹λ³„μž(task-1)κ°€ 될 수 μžˆμŠ΅λ‹ˆλ‹€.

β˜… Worktree Integration μ›Œν¬νŠΈλ¦¬ 톡합

Git worktree isolation can be controlled via the worktree-policy parameter:

Git μ›Œν¬νŠΈλ¦¬ κ²©λ¦¬λŠ” worktree-policy λ§€κ°œλ³€μˆ˜λ‘œ μ œμ–΄ν•  수 μžˆμŠ΅λ‹ˆλ‹€:

Policy Behaviorλ™μž‘
off No worktree isolation. Workers share the working tree.μ›Œν¬νŠΈλ¦¬ 격리 μ—†μŒ. μ›Œμ»€κ°€ μž‘μ—… 트리λ₯Ό κ³΅μœ ν•©λ‹ˆλ‹€.
on Always use git worktrees for worker isolation.항상 git μ›Œν¬νŠΈλ¦¬λ₯Ό μ‚¬μš©ν•˜μ—¬ μ›Œμ»€λ₯Ό κ²©λ¦¬ν•©λ‹ˆλ‹€.
auto Use worktrees if available (delegates to the legacy worktree boolean). Resolves to !!worktree.μ‚¬μš© κ°€λŠ₯ν•˜λ©΄ μ›Œν¬νŠΈλ¦¬ μ‚¬μš©(λ ˆκ±°μ‹œ worktree λΆˆλ¦¬μ–Έμ— μœ„μž„). !!worktree둜 ν•΄μ„λ©λ‹ˆλ‹€.

The resolved boolean is passed to runAgent() as the worktree option.

ν•΄μ„λœ λΆˆλ¦¬μ–Έμ€ worktree μ˜΅μ…˜μœΌλ‘œ runAgent()에 μ „λ‹¬λ©λ‹ˆλ‹€.

● Configuration μ„€μ •

Env Varν™˜κ²½ λ³€μˆ˜ DefaultκΈ°λ³Έκ°’ Descriptionμ„€λͺ…
PI_ENABLE_TEAM_MODE (unset)(λ―Έμ„€μ •) Set to 1 to enable team mode1둜 μ„€μ •ν•˜μ—¬ νŒ€ λͺ¨λ“œ ν™œμ„±ν™”
PI_TEAM_WORKER (unset)(λ―Έμ„€μ •) Auto-set inside workers to suppress recursive orchestrationμ›Œμ»€ λ‚΄λΆ€μ—μ„œ μžλ™ μ„€μ •λ˜μ–΄ μž¬κ·€μ  μ˜€μΌ€μŠ€νŠΈλ ˆμ΄μ…˜ μ–΅μ œ
PI_TEAM_RUN_STATE_ROOT cwd/.pi/agent/runs Override state file storage locationμƒνƒœ 파일 μ €μž₯ μœ„μΉ˜ μž¬μ •μ˜
● Guards ● κ°€λ“œ

The team tool is only registered when PI_ENABLE_TEAM_MODE=1 AND the session is a root session (not itself a team worker). Workers receive PI_TEAM_WORKER=1 and PI_SUBAGENT_MAX_DEPTH=1 in their environment.

team λ„κ΅¬λŠ” PI_ENABLE_TEAM_MODE=1이고 μ„Έμ…˜μ΄ 루트 μ„Έμ…˜(μžμ‹ μ΄ νŒ€ μ›Œμ»€κ°€ μ•„λ‹˜)일 λ•Œλ§Œ λ“±λ‘λ©λ‹ˆλ‹€. μ›Œμ»€λŠ” ν™˜κ²½μ— PI_TEAM_WORKER=1κ³Ό PI_SUBAGENT_MAX_DEPTH=1을 λ°›μŠ΅λ‹ˆλ‹€.

β—† Edge Cases μ—£μ§€ μΌ€μ΄μŠ€

Abort / Ctrl+C 쀑단 / Ctrl+C

When the tool's AbortSignal fires, all pending and in_progress tasks are marked interrupted, registered tmux resources are cleaned up, and the run status is set to interrupted. The abort races against normal worker completion via Promise.race().

λ„κ΅¬μ˜ AbortSignal이 λ°œλ™ν•˜λ©΄ λͺ¨λ“  pending 및 in_progress νƒœμŠ€ν¬κ°€ interrupted둜 ν‘œμ‹œλ˜κ³ , λ“±λ‘λœ tmux λ¦¬μ†ŒμŠ€κ°€ μ •λ¦¬λ˜λ©°, μ‹€ν–‰ μƒνƒœκ°€ interrupted둜 μ„€μ •λ©λ‹ˆλ‹€. 쀑단은 Promise.race()λ₯Ό 톡해 정상 μ›Œμ»€ μ™„λ£Œμ™€ κ²½μŸν•©λ‹ˆλ‹€.

Session Shutdown μ„Έμ…˜ μ’…λ£Œ

Double Ctrl+C during pi interactive shutdown emits session_shutdown during runtimeHost.dispose rather than calling session.abort(). The extension registers a session_shutdown handler that calls cleanupActiveTeamTmuxResources(), ensuring all active tmux sessions and panes are cleaned up even when the abort signal path is bypassed.

pi μΈν„°λž™ν‹°λΈŒ μ’…λ£Œ 쀑 이쀑 Ctrl+CλŠ” session.abort()λ₯Ό ν˜ΈμΆœν•˜μ§€ μ•Šκ³  runtimeHost.dispose 쀑 session_shutdown을 λ°œμƒμ‹œν‚΅λ‹ˆλ‹€. μ΅μŠ€ν…μ…˜μ€ cleanupActiveTeamTmuxResources()λ₯Ό ν˜ΈμΆœν•˜λŠ” session_shutdown ν•Έλ“€λŸ¬λ₯Ό λ“±λ‘ν•˜μ—¬, 쀑단 μ‹œκ·Έλ„ κ²½λ‘œκ°€ μš°νšŒλ˜μ–΄λ„ λͺ¨λ“  ν™œμ„± tmux μ„Έμ…˜κ³Ό 페인이 μ •λ¦¬λ˜λ„λ‘ ν•©λ‹ˆλ‹€.

Partial Pane Cleanup on Setup Failure μ„€μ • μ‹€νŒ¨ μ‹œ λΆ€λΆ„ 페인 정리

If pane creation partially fails (e.g., only 2 of 4 panes are created before an error), the already-created panes are cleaned up via cleanupTeamTmuxResources() to prevent orphaned tmux sessions.

페인 생성이 λΆ€λΆ„μ μœΌλ‘œ μ‹€νŒ¨ν•˜λ©΄(예: 였λ₯˜ μ „ 4개 쀑 2개만 생성), 고립된 tmux μ„Έμ…˜μ„ λ°©μ§€ν•˜κΈ° μœ„ν•΄ 이미 μƒμ„±λœ 페인이 cleanupTeamTmuxResources()λ₯Ό 톡해 μ •λ¦¬λ©λ‹ˆλ‹€.

Active Team Tmux Resource Registry ν™œμ„± νŒ€ tmux λ¦¬μ†ŒμŠ€ λ ˆμ§€μŠ€νŠΈλ¦¬

An in-memory Set<TeamTmuxCleanupRegistration> tracks all active tmux resources across concurrent team runs. Registrations are added when tmux panes are created and removed on normal completion. The registry enables cross-run cleanup during session shutdown.

λ©”λͺ¨λ¦¬ λ‚΄ Set<TeamTmuxCleanupRegistration>이 λ™μ‹œ νŒ€ μ‹€ν–‰ μ „μ²΄μ˜ λͺ¨λ“  ν™œμ„± tmux λ¦¬μ†ŒμŠ€λ₯Ό μΆ”μ ν•©λ‹ˆλ‹€. 등둝은 tmux 페인 생성 μ‹œ μΆ”κ°€λ˜κ³  정상 μ™„λ£Œ μ‹œ μ œκ±°λ©λ‹ˆλ‹€. λ ˆμ§€μŠ€νŠΈλ¦¬λŠ” μ„Έμ…˜ μ’…λ£Œ 쀑 ꡐ차 μ‹€ν–‰ 정리λ₯Ό κ°€λŠ₯ν•˜κ²Œ ν•©λ‹ˆλ‹€.

Failed Runs Leave Tmux Alive μ‹€νŒ¨ν•œ 싀행은 tmuxλ₯Ό μœ μ§€ν•©λ‹ˆλ‹€

On success, tmux resources are cleaned immediately. On failure, tmux panes/sessions are intentionally left alive for debugging. Use cleanupActiveTeamTmuxResources() or attach to the session manually to inspect.

성곡 μ‹œ tmux λ¦¬μ†ŒμŠ€λŠ” μ¦‰μ‹œ μ •λ¦¬λ©λ‹ˆλ‹€. μ‹€νŒ¨ μ‹œ tmux 페인/μ„Έμ…˜μ€ 디버깅을 μœ„ν•΄ μ˜λ„μ μœΌλ‘œ μ‚΄λ €λ‘‘λ‹ˆλ‹€. cleanupActiveTeamTmuxResources()λ₯Ό μ‚¬μš©ν•˜κ±°λ‚˜ μˆ˜λ™μœΌλ‘œ μ„Έμ…˜μ— μ—°κ²°ν•˜μ—¬ κ²€μ‚¬ν•˜μ„Έμš”.