# Agent Teams Experiment Log > Experiment date: 2026-02-12 > Test case: `~/codeman-cases/agent-teams-test/` > Team name: `research-watchers` > Teammates: 3 (fs-researcher, perf-researcher, api-researcher) > Lead session: `461daa80-94ec-4e5e-a1bb-0518f78311bc` > Duration: ~3 minutes (06:45:01 → 06:48:07) ## Pre-Experiment State ``` ~/.claude/teams/ — did NOT exist ~/.claude/tasks/ — 75 UUID-named directories (from regular Task tool subagents) Claude processes — 7 (including watchers) settings.local.json — edited to add CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 ``` ## Experiment Prompt ``` Create an agent team with 3 teammates to research the following topics in parallel: Teammate 1 fs-researcher researches how Node.js fs.watch works on Linux vs macOS. Teammate 2 perf-researcher researches inotify performance limits and alternatives. Teammate 3 api-researcher researches the inotifywait command-line API. Have each teammate write a brief summary of their findings in a separate file. Name the team research-watchers. ``` --- ## Question 1: What exact filesystem artifacts do agent teams create? **Expected:** `~/.claude/teams/research-watchers/config.json` and `~/.claude/tasks/research-watchers/` **Actual: CONFIRMED + SURPRISE inboxes/ directory** ``` ~/.claude/teams/research-watchers/ ├── config.json # Team config (members, lead, metadata) └── inboxes/ # Filesystem-based messaging! ├── api-researcher.json # Per-teammate inbox ├── fs-researcher.json ├── perf-researcher.json └── team-lead.json # Lead also has an inbox ~/.claude/tasks/research-watchers/ ├── .lock # Empty file (presence = lock indicator?) ├── 1.json # Task: Research Node.js fs.watch ├── 2.json # Task: Research inotify performance ├── 3.json # Task: Research inotifywait CLI ├── 4.json # Internal: fs-researcher spawn tracking ├── 5.json # Internal: perf-researcher spawn tracking └── 6.json # Internal: api-researcher spawn tracking ``` Subagent transcripts also appear in the standard subagent directory: ``` ~/.claude/projects/-home-arkon-codeman-cases-agent-teams-test/ └── 461daa80.../ ├── 461daa80...jsonl # Lead session transcript └── subagents/ ├── agent-ae50544.jsonl # Teammate: fs-researcher ├── agent-aa20c65.jsonl # Teammate: perf-researcher ├── agent-a29de32.jsonl # Teammate: api-researcher ├── agent-a04968e.jsonl # Sub-subagent (teammate's Task tool) ├── agent-a0d372e.jsonl # Sub-subagent ├── agent-a2ff939.jsonl # Sub-subagent ├── agent-a89ad82.jsonl # Sub-subagent ├── agent-aa1efc7.jsonl # Sub-subagent └── agent-ab0ef07.jsonl # Sub-subagent ``` **Cleanup:** At 06:48:02, the lead deleted ALL artifacts — inboxes, config, tasks, the team directory itself. Clean removal. --- ## Question 2: Is the mailbox/communication filesystem-based or tool-based? **Expected:** Tool-based (SendMessage tool), NOT filesystem **Actual: BOTH! Hybrid — tool triggers filesystem writes.** Communication uses the `SendMessage` tool internally, but the actual message delivery is via **filesystem inbox files**. Each teammate has `~/.claude/teams/{name}/inboxes/{teammate}.json` containing a JSON array of messages. **Inbox message format:** ```json [ { "from": "team-lead", "text": "{\"type\":\"task_assignment\",\"taskId\":\"1\",\"subject\":\"Research Node.js fs.watch...\",\"assignedBy\":\"team-lead\",\"timestamp\":\"...\"}", "timestamp": "2026-02-12T05:45:18.176Z", "read": false } ] ``` Key observations: - `text` field is a **JSON string** (double-encoded) containing a typed message object - Message types observed: `task_assignment`, `shutdown_request`, `shutdown_response` - `read` field tracks whether teammate has processed the message (false → true) - **File locking** via `.json.lock` directories (mkdir-based atomic lock, created then deleted) - Lead also has an inbox (`team-lead.json`) for receiving messages FROM teammates **Implication for Codeman:** We CAN intercept messages by watching inbox JSON files! We can also potentially inject messages by writing to inbox files. --- ## Question 3: Do teammates appear in the subagents directory? **Expected:** Unclear **Actual: YES! Teammates appear as standard subagents.** Teammates create transcript files at: ``` ~/.claude/projects/{hash}/{leadSessionId}/subagents/agent-{agentId}.jsonl ``` This is the **exact same path pattern** that regular Task tool subagents use. The existing `subagent-watcher.ts` successfully discovers them. Codeman's `/api/subagents` endpoint returned them with status "active": ``` Agent: ae50544 Status: active Tools: 8 Model: claude-opus-4-6 Desc: