pi-subagent-manager 1.11.0 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +9 -9
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.js +1 -47
  4. package/dist/orch/checklist-integration.js +2 -30
  5. package/dist/orch/context-entries.js +0 -2
  6. package/dist/orch/cost-ledger.js +0 -5
  7. package/dist/orch/diagnostics.js +0 -9
  8. package/dist/orch/extensions.js +22 -21
  9. package/dist/orch/housekeeping-usage.js +0 -5
  10. package/dist/orch/housekeeping.js +1 -34
  11. package/dist/orch/inherited-tools.js +0 -14
  12. package/dist/orch/mailbox.js +0 -1
  13. package/dist/orch/manager.js +4 -44
  14. package/dist/orch/paths.js +0 -4
  15. package/dist/orch/prompt.js +1 -5
  16. package/dist/orch/registry.js +1 -20
  17. package/dist/orch/runtime.js +1 -48
  18. package/dist/orch/tools.js +0 -2
  19. package/dist/orch/transcript.js +0 -11
  20. package/dist/prefs/agent-import.js +2 -10
  21. package/dist/prefs/config.js +3 -51
  22. package/dist/prefs/import-discovery.js +0 -15
  23. package/dist/prefs/import-instructions.js +0 -2
  24. package/dist/prefs/models.js +0 -1
  25. package/dist/prefs/settings.js +22 -25
  26. package/dist/types.js +0 -1
  27. package/dist/ui/agent-loader.js +0 -10
  28. package/dist/ui/agent-navigation-editor.js +0 -21
  29. package/dist/ui/cost-footer.js +3 -9
  30. package/dist/ui/dialog.js +1 -29
  31. package/dist/ui/import-picker.js +0 -20
  32. package/dist/ui/live-agent-view.js +0 -19
  33. package/dist/ui/model-picker.js +0 -20
  34. package/dist/ui/settings-ui.js +8 -12
  35. package/dist/ui/status-ui.js +0 -17
  36. package/dist/ui/thread-tree.js +1 -12
  37. package/dist/ui/tool-picker.js +1 -4
  38. package/dist/ui/transcript-tool.js +0 -9
  39. package/dist/ui/ui.js +1 -29
  40. package/package.json +3 -3
  41. package/dist/index.d.ts.map +0 -1
  42. package/dist/index.js.map +0 -1
  43. package/dist/orch/checklist-integration.d.ts +0 -48
  44. package/dist/orch/checklist-integration.d.ts.map +0 -1
  45. package/dist/orch/checklist-integration.js.map +0 -1
  46. package/dist/orch/context-entries.d.ts +0 -8
  47. package/dist/orch/context-entries.d.ts.map +0 -1
  48. package/dist/orch/context-entries.js.map +0 -1
  49. package/dist/orch/cost-ledger.d.ts +0 -16
  50. package/dist/orch/cost-ledger.d.ts.map +0 -1
  51. package/dist/orch/cost-ledger.js.map +0 -1
  52. package/dist/orch/diagnostics.d.ts +0 -13
  53. package/dist/orch/diagnostics.d.ts.map +0 -1
  54. package/dist/orch/diagnostics.js.map +0 -1
  55. package/dist/orch/extensions.d.ts +0 -15
  56. package/dist/orch/extensions.d.ts.map +0 -1
  57. package/dist/orch/extensions.js.map +0 -1
  58. package/dist/orch/housekeeping-usage.d.ts +0 -14
  59. package/dist/orch/housekeeping-usage.d.ts.map +0 -1
  60. package/dist/orch/housekeeping-usage.js.map +0 -1
  61. package/dist/orch/housekeeping.d.ts +0 -89
  62. package/dist/orch/housekeeping.d.ts.map +0 -1
  63. package/dist/orch/housekeeping.js.map +0 -1
  64. package/dist/orch/inherited-tools.d.ts +0 -18
  65. package/dist/orch/inherited-tools.d.ts.map +0 -1
  66. package/dist/orch/inherited-tools.js.map +0 -1
  67. package/dist/orch/mailbox.d.ts +0 -59
  68. package/dist/orch/mailbox.d.ts.map +0 -1
  69. package/dist/orch/mailbox.js.map +0 -1
  70. package/dist/orch/manager.d.ts +0 -82
  71. package/dist/orch/manager.d.ts.map +0 -1
  72. package/dist/orch/manager.js.map +0 -1
  73. package/dist/orch/paths.d.ts +0 -7
  74. package/dist/orch/paths.d.ts.map +0 -1
  75. package/dist/orch/paths.js.map +0 -1
  76. package/dist/orch/prompt.d.ts +0 -7
  77. package/dist/orch/prompt.d.ts.map +0 -1
  78. package/dist/orch/prompt.js.map +0 -1
  79. package/dist/orch/registry.d.ts +0 -49
  80. package/dist/orch/registry.d.ts.map +0 -1
  81. package/dist/orch/registry.js.map +0 -1
  82. package/dist/orch/runtime.d.ts +0 -11
  83. package/dist/orch/runtime.d.ts.map +0 -1
  84. package/dist/orch/runtime.js.map +0 -1
  85. package/dist/orch/tools.d.ts +0 -6
  86. package/dist/orch/tools.d.ts.map +0 -1
  87. package/dist/orch/tools.js.map +0 -1
  88. package/dist/orch/transcript.d.ts +0 -28
  89. package/dist/orch/transcript.d.ts.map +0 -1
  90. package/dist/orch/transcript.js.map +0 -1
  91. package/dist/prefs/agent-import.d.ts +0 -37
  92. package/dist/prefs/agent-import.d.ts.map +0 -1
  93. package/dist/prefs/agent-import.js.map +0 -1
  94. package/dist/prefs/config.d.ts +0 -108
  95. package/dist/prefs/config.d.ts.map +0 -1
  96. package/dist/prefs/config.js.map +0 -1
  97. package/dist/prefs/import-discovery.d.ts +0 -28
  98. package/dist/prefs/import-discovery.d.ts.map +0 -1
  99. package/dist/prefs/import-discovery.js.map +0 -1
  100. package/dist/prefs/import-instructions.d.ts +0 -3
  101. package/dist/prefs/import-instructions.d.ts.map +0 -1
  102. package/dist/prefs/import-instructions.js.map +0 -1
  103. package/dist/prefs/models.d.ts +0 -24
  104. package/dist/prefs/models.d.ts.map +0 -1
  105. package/dist/prefs/models.js.map +0 -1
  106. package/dist/prefs/settings.d.ts +0 -89
  107. package/dist/prefs/settings.d.ts.map +0 -1
  108. package/dist/prefs/settings.js.map +0 -1
  109. package/dist/types.d.ts +0 -293
  110. package/dist/types.d.ts.map +0 -1
  111. package/dist/types.js.map +0 -1
  112. package/dist/ui/agent-loader.d.ts +0 -21
  113. package/dist/ui/agent-loader.d.ts.map +0 -1
  114. package/dist/ui/agent-loader.js.map +0 -1
  115. package/dist/ui/agent-navigation-editor.d.ts +0 -46
  116. package/dist/ui/agent-navigation-editor.d.ts.map +0 -1
  117. package/dist/ui/agent-navigation-editor.js.map +0 -1
  118. package/dist/ui/cost-footer.d.ts +0 -37
  119. package/dist/ui/cost-footer.d.ts.map +0 -1
  120. package/dist/ui/cost-footer.js.map +0 -1
  121. package/dist/ui/dialog.d.ts +0 -135
  122. package/dist/ui/dialog.d.ts.map +0 -1
  123. package/dist/ui/dialog.js.map +0 -1
  124. package/dist/ui/import-picker.d.ts +0 -38
  125. package/dist/ui/import-picker.d.ts.map +0 -1
  126. package/dist/ui/import-picker.js.map +0 -1
  127. package/dist/ui/live-agent-view.d.ts +0 -82
  128. package/dist/ui/live-agent-view.d.ts.map +0 -1
  129. package/dist/ui/live-agent-view.js.map +0 -1
  130. package/dist/ui/model-picker.d.ts +0 -109
  131. package/dist/ui/model-picker.d.ts.map +0 -1
  132. package/dist/ui/model-picker.js.map +0 -1
  133. package/dist/ui/settings-ui.d.ts +0 -17
  134. package/dist/ui/settings-ui.d.ts.map +0 -1
  135. package/dist/ui/settings-ui.js.map +0 -1
  136. package/dist/ui/status-ui.d.ts +0 -67
  137. package/dist/ui/status-ui.d.ts.map +0 -1
  138. package/dist/ui/status-ui.js.map +0 -1
  139. package/dist/ui/thread-tree.d.ts +0 -22
  140. package/dist/ui/thread-tree.d.ts.map +0 -1
  141. package/dist/ui/thread-tree.js.map +0 -1
  142. package/dist/ui/tool-picker.d.ts +0 -46
  143. package/dist/ui/tool-picker.d.ts.map +0 -1
  144. package/dist/ui/tool-picker.js.map +0 -1
  145. package/dist/ui/transcript-tool.d.ts +0 -2
  146. package/dist/ui/transcript-tool.d.ts.map +0 -1
  147. package/dist/ui/transcript-tool.js.map +0 -1
  148. package/dist/ui/ui.d.ts +0 -41
  149. package/dist/ui/ui.d.ts.map +0 -1
  150. package/dist/ui/ui.js.map +0 -1
  151. package/docs/assets/subagent-manager-demo.gif +0 -0
  152. package/docs/async-lifecycle.md +0 -153
  153. package/docs/custom-agents.md +0 -154
  154. package/docs/default-agents.md +0 -95
  155. package/docs/demo.md +0 -63
  156. package/docs/development.md +0 -75
  157. package/docs/importing-agents.md +0 -41
  158. package/docs/pi-footer.md +0 -128
  159. package/docs/research-claude.md +0 -258
  160. package/docs/research-codex.md +0 -143
  161. package/docs/research-default-agent-models.md +0 -121
  162. package/docs/research-model-audit-2026-10.md +0 -154
  163. package/docs/research-model-roles-coding.md +0 -99
  164. package/docs/research-model-roles-writing.md +0 -78
  165. package/docs/research-researcher-workflow.md +0 -97
  166. package/docs/settings.md +0 -293
  167. package/docs/subagent-extension-limitations.md +0 -98
  168. package/docs/threads.md +0 -73
  169. package/docs/tools-and-ui.md +0 -129
@@ -1,258 +0,0 @@
1
- # Claude Code subagents / Agent SDK research
2
-
3
- _Research only. No implementation done._
4
-
5
- ## Bottom line
6
-
7
- - **Use file-based `.claude/agents/*.md` definitions if we need the full subagent feature surface** (`hooks`, `isolation: worktree`, `omitClaudeMd`, color, experimental cache TTL). **Programmatic SDK `AgentDefinition` is a subset**, and the Python SDK is the smallest subset. ([subagents docs](https://code.claude.com/docs/en/sub-agents), [TS SDK ref](https://code.claude.com/docs/en/agent-sdk/typescript), [Python SDK ref](https://code.claude.com/docs/en/agent-sdk/python), [Python source](https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/types.py))
8
- - **Capability restriction is `tools` + `disallowedTools`.** In SDK session options, **`allowedTools` / `allowed_tools` only auto-approve permissions; they do not restrict availability**. ([TS SDK ref](https://code.claude.com/docs/en/agent-sdk/typescript), [permissions guide](https://code.claude.com/docs/en/agent-sdk/permissions))
9
- - **Subagents are context-isolated by default**: fresh conversation, own system prompt, own context window, separate tool loop. They do **not** inherit the parent conversation history/tool results/auto memory/output style. ([subagents docs](https://code.claude.com/docs/en/sub-agents), [SDK subagents](https://code.claude.com/docs/en/agent-sdk/subagents))
10
- - **Background is the default** in SDK/programmatic subagent use, and resume is a first-class concept; if we need live steering/interrupts/status handling, the streaming/client APIs matter more than one-shot `query()`. ([SDK subagents](https://code.claude.com/docs/en/agent-sdk/subagents), [SDK sessions](https://code.claude.com/docs/en/agent-sdk/sessions), [Python source `query.py`](https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/query.py), [Python source `client.py`](https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/client.py))
11
-
12
- ## 1) File-based frontmatter: supported fields
13
-
14
- For custom subagent markdown files, the documented frontmatter fields are:
15
-
16
- - **Required:** `name`, `description`
17
- - **Optional:** `tools`, `disallowedTools`, `model`, `permissionMode`, `maxTurns`, `skills`, `mcpServers`, `hooks`, `memory`, `background`, `omitClaudeMd`, `effort`, `isolation`, `color`, `initialPrompt`, `experimental` (`cacheTtl` inside it)
18
-
19
- Important config rules:
20
-
21
- - **Exact camelCase matters** (`disallowedTools`, `maxTurns`, etc.).
22
- - **Unknown fields are silently ignored**.
23
- - `background: true` forces background execution.
24
- - `isolation: worktree` is the documented file-based isolation mode.
25
- - `omitClaudeMd: true` skips user/project/local `CLAUDE.md` loading for that subagent.
26
-
27
- Source: [Create custom subagents](https://code.claude.com/docs/en/sub-agents)
28
-
29
- ## 2) SDK parity vs file-based frontmatter
30
-
31
- ### TypeScript `AgentDefinition` (documented)
32
-
33
- Programmatic subagents in the TS Agent SDK support:
34
-
35
- - `description`, `prompt`
36
- - `tools`, `disallowedTools`
37
- - `model`
38
- - `skills`, `memory`, `mcpServers`
39
- - `initialPrompt`, `maxTurns`
40
- - `background`, `omitClaudeMd`
41
- - `effort`, `permissionMode`
42
- - `criticalSystemReminder_EXPERIMENTAL`
43
-
44
- Source: [TS SDK reference](https://code.claude.com/docs/en/agent-sdk/typescript), [SDK subagents](https://code.claude.com/docs/en/agent-sdk/subagents)
45
-
46
- ### Python `AgentDefinition` (documented + source-confirmed)
47
-
48
- Current Python `AgentDefinition` supports:
49
-
50
- - `description`, `prompt`
51
- - `tools`, `disallowedTools`
52
- - `model`
53
- - `skills`, `memory`, `mcpServers`
54
- - `initialPrompt`, `maxTurns`
55
- - `background`, `effort`, `permissionMode`
56
-
57
- Notably, the current Python implementation **does not define** `omitClaudeMd`, `hooks`, or `isolation` on `AgentDefinition`. That matches the narrower Python docs surface.
58
-
59
- Sources: [Python SDK reference](https://code.claude.com/docs/en/agent-sdk/python), [Python source `types.py`](https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/types.py)
60
-
61
- ### Practical implication
62
-
63
- If Pi needs per-agent `worktree` isolation, per-agent hooks, or full frontmatter parity, **do not assume programmatic `AgentDefinition` is enough**; the file-based subagent path is richer.
64
-
65
- ## 3) Tool allow/block semantics
66
-
67
- ### File-based / programmatic subagent capability shaping
68
-
69
- - `tools` = **actual allowlist of tools present in the subagent session**.
70
- - If `tools` is omitted, the subagent **inherits every tool available to subagents**.
71
- - `disallowedTools` removes tools from the inherited/specified set.
72
- - If a tool is left out, it is **not present at all** — no prompt, no fallback.
73
-
74
- Sources: [Create custom subagents](https://code.claude.com/docs/en/sub-agents), [SDK subagents](https://code.claude.com/docs/en/agent-sdk/subagents)
75
-
76
- ### Do not confuse with SDK `allowedTools` / `allowed_tools`
77
-
78
- - SDK `allowedTools` / `allowed_tools` are **permission auto-approval** lists.
79
- - The docs are explicit: **“This does not restrict Claude to only these tools.”**
80
- - Use `disallowedTools` to block tools at the session level; use subagent `tools` / `disallowedTools` to shape a subagent’s tool inventory.
81
-
82
- Sources: [TS SDK reference](https://code.claude.com/docs/en/agent-sdk/typescript), [permissions guide](https://code.claude.com/docs/en/agent-sdk/permissions)
83
-
84
- ### Universal subagent removals
85
-
86
- The subagent docs say these are removed from **every** subagent, even if listed in `tools`:
87
-
88
- - `AskUserQuestion`
89
- - `EndConversation`
90
- - `EnterPlanMode`
91
- - `ScheduleWakeup`
92
- - `WaitForMcpServers`
93
- - `Workflow`
94
-
95
- Conditionals:
96
-
97
- - `ExitPlanMode` is removed unless the subagent `permissionMode` is `plan`
98
- - `Agent` is removed at the depth limit
99
-
100
- Source: [Create custom subagents](https://code.claude.com/docs/en/sub-agents)
101
-
102
- ### Foreground vs background tool surface
103
-
104
- By default subagents inherit built-in + MCP tools from the main conversation, then Claude Code applies filters. The docs explicitly say **background subagents keep every MCP tool but only a reduced built-in set**:
105
-
106
- `Read`, `Grep`, `Glob`, `LSP`, `Bash`, `PowerShell`, `Edit`, `Write`, `NotebookEdit`, `WebFetch`, `WebSearch`, `TodoWrite`, `Skill`, `ToolSearch`, `EnterWorktree`, `ExitWorktree`, `Monitor`, `TaskStop`, `SendMessage`, `Artifact` (plus `SubagentHandback` when applicable).
107
-
108
- So the **same subagent definition can resolve to a different tool set in foreground vs background**.
109
-
110
- Source: [Create custom subagents](https://code.claude.com/docs/en/sub-agents)
111
-
112
- ## 4) Context inheritance and isolation
113
-
114
- ### What a non-fork subagent gets at startup
115
-
116
- The docs say a non-fork subagent starts fresh, but not empty. It gets:
117
-
118
- - its **own system prompt** plus environment details
119
- - the **delegation/task message**
120
- - **`CLAUDE.md` files** (unless `omitClaudeMd`, and Explore/Plan skip them)
121
- - a **git status snapshot** (Explore/Plan skip it)
122
- - **preloaded skills** from the `skills` field
123
- - a **sibling roster** reminder when `SendMessage` is available and other named agents exist
124
-
125
- Sources: [Create custom subagents](https://code.claude.com/docs/en/sub-agents), [SDK subagents](https://code.claude.com/docs/en/agent-sdk/subagents)
126
-
127
- ### What it does **not** inherit
128
-
129
- The docs explicitly say the subagent does **not** get:
130
-
131
- - the parent **conversation history**
132
- - the parent’s already-invoked **skills**
133
- - the files Claude already **read**
134
- - the parent **system prompt**
135
- - the parent’s **auto memory**
136
- - the parent’s **output style**
137
- - the parent’s **context-window size** (the subagent’s model controls that)
138
-
139
- Also: **skills do not inherit from the parent conversation**; if we want startup preload, we must list them in `skills`.
140
-
141
- Sources: [Create custom subagents](https://code.claude.com/docs/en/sub-agents), [SDK subagents](https://code.claude.com/docs/en/agent-sdk/subagents)
142
-
143
- ### Working directory / isolation
144
-
145
- - Subagents start in the parent session’s current working directory.
146
- - `cd` inside Bash/PowerShell tool calls does not persist between calls.
147
- - File-based agents can use `isolation: worktree` for a temporary git worktree.
148
- - **Programmatic SDK AgentDefinition does not document per-agent `cwd`, `additionalDirectories`, or `isolation`.** Those controls are session-level, not per-agent.
149
-
150
- Sources: [Create custom subagents](https://code.claude.com/docs/en/sub-agents), [TS SDK reference](https://code.claude.com/docs/en/agent-sdk/typescript), [Python SDK reference](https://code.claude.com/docs/en/agent-sdk/python)
151
-
152
- ## 5) Foreground/background lifecycle
153
-
154
- ### Defaults and launch behavior
155
-
156
- - In SDK subagents, **background is the default**.
157
- - If an `Agent` tool call omits `run_in_background`, it launches a background subagent.
158
- - Claude sets `run_in_background: false` when it needs the result before continuing.
159
- - `background: true` forces background execution even when Claude wants the result.
160
-
161
- Sources: [SDK subagents](https://code.claude.com/docs/en/agent-sdk/subagents), [Create custom subagents](https://code.claude.com/docs/en/sub-agents)
162
-
163
- ### Foreground behavior
164
-
165
- - Foreground subagents **block the main conversation until complete**.
166
- - Permission prompts are passed through to the user.
167
-
168
- Source: [Create custom subagents](https://code.claude.com/docs/en/sub-agents)
169
-
170
- ### Background behavior
171
-
172
- - Background subagents run concurrently while the main conversation continues.
173
- - If a background subagent hits a permissioned tool call, Claude Code surfaces the prompt in the main session and names the subagent.
174
- - `Esc` denies just that one tool call without stopping the subagent.
175
- - Longer-lived permission grants apply to the **whole session**, including the main conversation.
176
- - Results come back later as a **completion notification**; if asked early, Claude reports the subagent is still running.
177
-
178
- Source: [Create custom subagents](https://code.claude.com/docs/en/sub-agents)
179
-
180
- ## 6) Steering, resume, stop/pause, status
181
-
182
- ### Steering
183
-
184
- Documented steering controls:
185
-
186
- - When fork mode is off, ask Claude to run a task in the **foreground** or **background**.
187
- - Press **`Ctrl+B`** to background a running task.
188
-
189
- Source: [Create custom subagents](https://code.claude.com/docs/en/sub-agents)
190
-
191
- ### Resume semantics
192
-
193
- - Each subagent invocation is a **new instance** unless explicitly resumed.
194
- - A resumed subagent retains **full conversation history, tool calls, results, and reasoning**.
195
- - A completed subagent resumes **in the background** without a new `Agent` invocation.
196
- - A resumed run keeps the **tool set from the first run**.
197
- - Built-in **Explore** and **Plan** are **one-shot** and return no agent ID, so they **cannot be resumed**.
198
-
199
- Source: [Create custom subagents](https://code.claude.com/docs/en/sub-agents)
200
-
201
- ### Session-level continue / resume / fork
202
-
203
- SDK session semantics:
204
-
205
- - `continue` / `continue_conversation=True` = resume the **most recent** session in the current directory
206
- - `resume` = resume a **specific** `session_id`
207
- - `fork` = create a **new** session with a copy of an existing session’s history
208
- - `session_id` is returned on result messages
209
-
210
- Source: [SDK sessions](https://code.claude.com/docs/en/agent-sdk/sessions)
211
-
212
- ### Status / monitoring surfaces
213
-
214
- If Pi needs runtime observability, the official surfaces are:
215
-
216
- - **SDK message stream**: background tasks (including subagents) emit `TaskStartedMessage`, `TaskProgressMessage`, and `TaskNotificationMessage` (`completed` / `failed` / `stopped`). ([Python SDK ref](https://code.claude.com/docs/en/agent-sdk/python))
217
- - **Agent view CLI**: `claude agents --json` exposes session `state` = `working | blocked | done | failed | stopped`, live `status` = `busy | waiting | idle`, and `waitingFor` = `permission prompt | input needed | sandbox request | worker request | dialog open`. ([agent view](https://code.claude.com/docs/en/agent-view))
218
-
219
- ### Stop / pause behavior
220
-
221
- - The Python streaming client exposes `interrupt()` and `stop_task(task_id)`; one-shot `query()` explicitly says **no interrupts / no follow-up messages**. ([Python source `client.py`](https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/client.py), [Python source `query.py`](https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/query.py))
222
- - I found **no dedicated documented “pause subagent” API**. The documented controls are **background**, **stop**, and **resume**.
223
- - If the user explicitly stops a subagent, it **does not auto-resume**; while its row is still present, the user can resume it from its transcript.
224
-
225
- Sources: [Create custom subagents](https://code.claude.com/docs/en/sub-agents), [agent view](https://code.claude.com/docs/en/agent-view)
226
-
227
- ### Backgrounding a foreground session with active subagents
228
-
229
- This is the closest thing to a “pause” semantic in the docs, and it matters:
230
-
231
- - When backgrounding a foreground session, Claude Code tries to wait for running foreground subagents so work can carry over.
232
- - If the user forces immediate backgrounding, **running subagents restart from the beginning** and previously spent tokens are spent again.
233
- - Some work (for example active monitors) cannot carry over and is stopped.
234
-
235
- Source: [agent view](https://code.claude.com/docs/en/agent-view)
236
-
237
- ## 7) Unsupported features / assumptions to avoid
238
-
239
- - **Do not assume unknown frontmatter keys fail loudly.** The docs say they are silently ignored.
240
- - **Do not assume `allowedTools` means capability restriction.** It is permission pre-approval, not tool removal.
241
- - **Do not assume subagents can ask the user clarifying questions themselves.** `AskUserQuestion` is removed from every subagent.
242
- - **Do not assume parent memory/style/history carry over.** Auto memory, output style, prior reads, and prior tool results do not.
243
- - **Do not assume programmatic SDK agents can express all markdown-frontmatter features.** File-based config is richer, especially for `hooks` and `isolation`; Python is narrower still.
244
- - **Do not assume a generic pause primitive exists.** The documented controls are backgrounding, stop, resume, and workflow/session-level carry-over behavior.
245
- - **Do not assume per-agent filesystem scoping exists in the SDK.** No documented per-agent `cwd`, `additionalDirectories`, or `isolation` field exists in SDK `AgentDefinition`.
246
-
247
- ## Primary sources
248
-
249
- - Claude Code subagents: https://code.claude.com/docs/en/sub-agents
250
- - Agent SDK subagents: https://code.claude.com/docs/en/agent-sdk/subagents
251
- - Agent SDK sessions: https://code.claude.com/docs/en/agent-sdk/sessions
252
- - Agent SDK permissions: https://code.claude.com/docs/en/agent-sdk/permissions
253
- - Agent view / background sessions: https://code.claude.com/docs/en/agent-view
254
- - TypeScript SDK reference: https://code.claude.com/docs/en/agent-sdk/typescript
255
- - Python SDK reference: https://code.claude.com/docs/en/agent-sdk/python
256
- - Python SDK source (`AgentDefinition`): https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/types.py
257
- - Python SDK source (`query()`): https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/query.py
258
- - Python SDK source (`ClaudeSDKClient`): https://github.com/anthropics/claude-agent-sdk-python/blob/main/src/claude_agent_sdk/client.py
@@ -1,143 +0,0 @@
1
- # Technical Research: OpenAI Codex subagents / multi-agent lifecycle
2
-
3
- ## Summary
4
- Current upstream Codex has **two distinct subagent tool surfaces**. **MultiAgent V1** matches the classic lifecycle you asked about (`spawn_agent` → `send_input` → `wait_agent` → `close_agent` / `resume_agent`), but it is centered on **thread IDs**. **MultiAgent V2** matches the **hierarchical `/root/...` path model** you want, but it changes the lifecycle to `spawn_agent` → `send_message` / `followup_task` → `wait_agent` → `interrupt_agent`, with **no model-facing `close_agent` or `resume_agent`**. This means your desired combination of **path hierarchy + V1 lifecycle verbs** is **not a single upstream interface today**; it is a custom requirement built from parts that upstream currently splits across V1 and V2. [Docs](https://developers.openai.com/codex/subagents) [V1/V2 source](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs)
5
-
6
- ## Key Code Examples & APIs
7
-
8
- ### Surface comparison
9
-
10
- | Concern | Upstream V1 | Upstream V2 |
11
- | --- | --- | --- |
12
- | Spawn result | `agent_id` + optional nickname | canonical `task_name` (+ optional nickname) |
13
- | Primary targeting | thread id | hierarchical task path |
14
- | Send more work | `send_input` | `send_message` or `followup_task` |
15
- | Wait semantics | explicit target wait for final statuses | mailbox-activity wait, not target-specific |
16
- | Stop/close | `close_agent` | `interrupt_agent` |
17
- | Reopen | `resume_agent` | no model-facing resume |
18
-
19
- Sources: [tool spec](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs), [V1 handlers](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents.rs), [V2 handlers](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2.rs)
20
-
21
- ### V1 lifecycle shape
22
- ```json
23
- {
24
- "tool": "multi_agent_v1.spawn_agent",
25
- "arguments": { "message": "Investigate X", "fork_context": false }
26
- }
27
- ```
28
- ```json
29
- {
30
- "tool": "multi_agent_v1.send_input",
31
- "arguments": { "target": "<agent_id>", "message": "Continue", "interrupt": false }
32
- }
33
- ```
34
- ```json
35
- {
36
- "tool": "multi_agent_v1.wait_agent",
37
- "arguments": { "targets": ["<agent_id>"], "timeout_ms": 30000 }
38
- }
39
- ```
40
- ```json
41
- { "tool": "multi_agent_v1.close_agent", "arguments": { "target": "<agent_id>" } }
42
- ```
43
- ```json
44
- { "tool": "multi_agent_v1.resume_agent", "arguments": { "id": "<agent_id>" } }
45
- ```
46
- Sources: [spec](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs), [spawn](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/spawn.rs), [send_input](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/send_input.rs), [wait](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/wait.rs), [close](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/close_agent.rs), [resume](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/resume_agent.rs)
47
-
48
- ### V2 lifecycle shape
49
- ```json
50
- {
51
- "tool": "spawn_agent",
52
- "arguments": {
53
- "task_name": "researcher",
54
- "message": "Investigate X",
55
- "fork_turns": "none"
56
- }
57
- }
58
- ```
59
- ```json
60
- {
61
- "tool": "send_message",
62
- "arguments": { "target": "researcher", "message": "One more angle" }
63
- }
64
- ```
65
- ```json
66
- {
67
- "tool": "followup_task",
68
- "arguments": { "target": "/root/researcher", "message": "Now verify Y" }
69
- }
70
- ```
71
- ```json
72
- { "tool": "wait_agent", "arguments": { "timeout_ms": 30000 } }
73
- ```
74
- ```json
75
- { "tool": "interrupt_agent", "arguments": { "target": "/root/researcher" } }
76
- ```
77
- Sources: [spec](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs), [spawn](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/spawn.rs), [message flow](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/message_tool.rs), [wait](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/wait.rs), [interrupt](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/interrupt_agent.rs)
78
-
79
- ### Path hierarchy
80
- - Root agent path is `/root`.
81
- - If the current agent is `/root/task1` and it spawns `task_3`, upstream V2 makes the child `/root/task1/task_3`.
82
- - That child can be referred to locally as `task_3` or canonically as `/root/task1/task_3`.
83
- - A sibling branch like `/root/task2/task_3` does **not** get that shorthand; it must use the canonical path.
84
-
85
- Sources: [spawn tool description](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs), [path construction](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_common.rs)
86
-
87
- ### Custom agent files
88
- ```toml
89
- # .codex/agents/reviewer.toml
90
- name = "reviewer"
91
- description = "PR reviewer focused on correctness, security, and missing tests."
92
- model = "gpt-6.1-sol"
93
- model_reasoning_effort = "medium"
94
- sandbox_mode = "read-only"
95
- developer_instructions = """
96
- Review code like an owner.
97
- Prioritize correctness, security, behavior regressions, and missing test coverage.
98
- """
99
- ```
100
- Source: [official subagents docs](https://developers.openai.com/codex/subagents)
101
-
102
- ## Findings
103
- 1. **The public Codex docs are conceptual; the source is required for exact tool semantics.** Official docs say current local Codex clients support subagent workflows by default, surface subagent activity in the desktop app / CLI / IDE, and support custom agents in `~/.codex/agents/` or `.codex/agents/`. But the docs do **not** spell out the exact model-facing tool API; the current open-source implementation does. [Docs](https://developers.openai.com/codex/subagents)
104
-
105
- 2. **Upstream currently ships two different multi-agent APIs, not one.** V1 exposes namespaced tools `multi_agent_v1.spawn_agent`, `send_input`, `resume_agent`, `wait_agent`, and `close_agent`. V2 exposes `spawn_agent`, `send_message`, `followup_task`, `wait_agent`, `interrupt_agent`, and `list_agents`. So `send_input` / `resume_agent` / `close_agent` are **V1 concepts**, while hierarchical task paths are a **V2 concept**. [Tool spec](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs) [V1 module](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents.rs) [V2 module](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2.rs)
106
-
107
- 3. **The exact lifecycle you asked for exists upstream only in V1.** In V1, `spawn_agent` returns an `agent_id`; `send_input` targets that id and can queue or interrupt; `wait_agent` waits on explicit target ids and returns final statuses; `close_agent` shuts down the target and descendants; `resume_agent` reopens a closed agent by id. [spawn](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/spawn.rs) [send_input](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/send_input.rs) [wait](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/wait.rs) [close](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/close_agent.rs) [resume](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/resume_agent.rs)
108
-
109
- 4. **V2 replaces that lifecycle with path-based messaging and runtime-managed reuse.** `send_message` queues text without triggering a turn; `followup_task` sends text and triggers a turn; `interrupt_agent` interrupts the current turn but explicitly keeps the agent reusable; `list_agents` enumerates live agents in the current root tree. There is **no model-facing `close_agent` or `resume_agent` in V2**, so load/unload/resume are runtime concerns, not agent tools. [spec](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs) [message flow](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/message_tool.rs) [followup_task](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/followup_task.rs) [interrupt](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/interrupt_agent.rs) [list_agents](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/list_agents.rs)
110
-
111
- 5. **V2 path behavior already matches most of the hierarchy you want.** Upstream V2 constructs a canonical child path by taking the caller’s current agent path (or `/root`) and appending `task_name`. That means `/a/b` spawning `c` yields `/a/b/c`, and `/k/l` is a different subtree. The tool description explicitly says a child can be referred to by local shorthand (`task_3`) or canonical path, but a sibling subtree must use the canonical path. This confirms hierarchical naming, not unconditional history inheritance: V2 separately controls history with `fork_turns`. Pi-subagent will make the lexical-parent snapshot rule explicit and will not inherit from an unrelated caller. [path construction](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_common.rs) [spawn description](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs)
112
-
113
- 6. **Important distinction: upstream separates `task_name` from role selection.** In V2, `task_name` is the path label segment, so `task_name = "researcher"` can produce `/root/researcher`. But the actual role/model/instructions come from `agent_type` and/or a custom agent file, not from `task_name` itself. That means “`/root/researcher`” is a valid upstream path label, but it does **not** automatically mean “spawn the `researcher` custom agent” unless role selection is also configured and exposed. [spawn args/spec](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/spawn.rs) [official custom-agent docs](https://developers.openai.com/codex/subagents)
114
-
115
- 7. **Context inheritance is explicit and different between V1 and V2.** V1 has `fork_context: bool`; `true` forks the current thread history, `false` starts from only the delegated prompt. V2 has `fork_turns`, which accepts `none`, `all`, or a positive integer string like `"3"`; in current source, omitted `fork_turns` defaults to `all`. So V2 supports fresh children, full-history forks, and partial-history forks. [V1 spec](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs) [V2 spawn parser](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/spawn.rs)
116
-
117
- 8. **Child config inheritance is parent-first, then layered overrides.** The source builds a child config from the parent’s effective config and live turn state, then applies requested model/reasoning overrides, then optional role/custom-agent config, then reapplies runtime-only overrides such as approval policy, permission profile, and cwd. Official docs match this: custom agents can define `model`, `model_reasoning_effort`, `sandbox_mode`, `mcp_servers`, and `skills.config`, while omitted values inherit from the parent/default resolution chain. [child config source](https://github.com/openai/codex/blob/main/codex-rs/core/src/agent/child_config.rs) [docs](https://developers.openai.com/codex/subagents)
118
-
119
- 9. **Officially documented agent config covers the key knobs you asked about.** `agents.enabled` defaults to `true`; `agents.max_concurrent_threads_per_session` caps spawned threads; `agents.max_threads` is a legacy alias; `agents.default_subagent_model` and `agents.default_subagent_reasoning_effort` provide defaults; `agents.interrupt_message` controls whether interruption is recorded into model-visible context. Custom agent files require `name`, `description`, and `developer_instructions`. [config reference summary](https://developers.openai.com/codex/config-file/config-reference) [subagents docs](https://developers.openai.com/codex/subagents)
120
-
121
- 10. **`wait_agent` is materially different across versions, and this matters for any implementation that wants parity.** V1 `wait_agent` takes explicit `targets` and waits for final statuses, returning per-target status objects. V2 `wait_agent` takes only an optional timeout and waits for **mailbox activity or steered input**, returning a brief message plus `timed_out`; it is **not** a target-specific join/barrier API. [V1 wait](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents/wait.rs) [V2 wait](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_v2/wait.rs) [spec text](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs)
122
-
123
- 11. **The current CLI/TUI explicitly surfaces subagent state and path-based activity.** Public docs say activity is visible in the app/CLI/IDE; current TUI code renders Started / Interacted / Interrupted / Completed activity rows, shows a `/subagents` picker, and surfaces states such as Pending init, Running, Interrupted, Completed, Error, Shutdown, and Not found. [docs](https://developers.openai.com/codex/subagents) [TUI source](https://github.com/openai/codex/blob/main/codex-rs/tui/src/multi_agents.rs)
124
-
125
- 12. **Bottom line: your requested design partly matches upstream and partly extends it.** Hierarchical naming matches upstream V2; Pi-subagent’s mandatory lexical-parent snapshot rule is a custom constraint (upstream controls forks separately). The classic `send_input` / `resume_agent` / `close_agent` lifecycle is upstream V1 behavior. A system that wants **both together** would be implementing a **custom Pi surface**, not copying one current Codex surface verbatim. [V1/V2 spec](https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs)
126
-
127
- ## Sources
128
- - Kept: OpenAI Codex Subagents docs (<https://developers.openai.com/codex/subagents>) — official product-level behavior, inheritance, custom agent schema, and UI claims.
129
- - Kept: OpenAI Codex config reference (<https://developers.openai.com/codex/config-file/config-reference>) — official `[agents]` settings and defaults/aliases.
130
- - Kept: `multi_agents_spec.rs` (<https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_spec.rs>) — authoritative model-facing tool schema for V1 and V2.
131
- - Kept: V1 handler sources (`multi_agents/*.rs`) — authoritative lifecycle behavior for `send_input`, `resume_agent`, `wait_agent`, `close_agent`.
132
- - Kept: V2 handler sources (`multi_agents_v2/*.rs`) — authoritative lifecycle behavior for `spawn_agent`, `send_message`, `followup_task`, `wait_agent`, `interrupt_agent`, `list_agents`.
133
- - Kept: `child_config.rs` (<https://github.com/openai/codex/blob/main/codex-rs/core/src/agent/child_config.rs>) — authoritative config inheritance / override logic.
134
- - Kept: `multi_agents_common.rs` (<https://github.com/openai/codex/blob/main/codex-rs/core/src/tools/handlers/multi_agents_common.rs>) — authoritative path construction for child agents.
135
- - Kept: TUI source (`tui/src/multi_agents.rs`) — corroborates current user-visible status surfacing.
136
- - Dropped: GitHub issues discussing docs/runtime mismatch for custom agents — useful background, but secondary to current docs + source and not needed for the checked conclusions here.
137
- - Dropped: Community forum posts about subagent model selection — secondary and partially stale relative to current `main`.
138
- - Dropped: PR discussions where current `main` source already reflects the merged behavior — helpful history, but less authoritative than the resulting code.
139
-
140
- ## Gaps
141
- - I did **not** audit every app-server/generated wire schema; if implementation later depends on exact desktop/web protocol payloads, inspect `codex-rs/protocol/src/items.rs` and app-server type exports directly.
142
- - The public config docs I checked do **not** appear to document every V2-specific internal knob; where V2 behavior matters here, I relied on current source rather than public config docs.
143
- - If later implementation needs exact name-resolution rules for every V2 tool (not just the documented path behavior), inspect the current `AgentControl::resolve` path in upstream source before coding.
@@ -1,121 +0,0 @@
1
- # Default-agent model shortlist
2
-
3
- > Historical five-role shortlist (2026-10-03). Superseded by the [October model audit](research-model-audit-2026-10.md) and [current six-role guide](default-agents.md), including researcher and cheap-first tasker recommendations.
4
-
5
- Research date: **2026-10-03**. This note compares only the 13 candidates requested for the five bundled roles. Suggestions are advisory display aliases, not runtime model IDs, pins, or availability guarantees. Model/role suitability is an inference from public evidence, not a local agent benchmark.
6
-
7
- ## How the evidence is used
8
-
9
- - **Architect:** prioritize reasoning, requirements coverage, tool use, and long-context reliability; accept slower generation for consequential decisions.
10
- - **Coder:** prioritize repository implementation and terminal/tool benchmarks, then interactive latency. Arena Code is a useful frontend preference signal, not proof that a patch passes tests.
11
- - **Reviewer:** prioritize careful code reasoning and independent verification. Coding benchmarks are indirect evidence; without a matched defect-detection/false-positive evaluation, do not claim a review-precision winner.
12
- - **Tasker:** prioritize complete few-step latency and adequate instruction/tool reliability. High-effort flagship benchmark results do not establish fast behavior at the bundled `low` setting.
13
- - **Writer:** prioritize creative-writing preference and voice-preserving edits. General reasoning and coding scores are secondary, and writing preference does not establish factual or citation accuracy.
14
-
15
- ### Speed and benchmark caveats
16
-
17
- [Artificial Analysis performance methodology](https://artificialanalysis.ai/methodology/performance-benchmarking) describes rolling 72-hour median speed measurements and normalized token counts. Its website default workload is 10K input tokens; a model page or provider route can use different settings. Record the endpoint, effort, and workload when disclosed. Output tok/sec excludes time-to-first-token; for reasoning models, first token is not necessarily first answer token. Unspecified settings remain unspecified.
18
-
19
- For a tool-driven job, the useful approximation is the sum over calls of initial latency plus generated tokens divided by output speed, plus tool execution and retries. A fast decoder can still lose on total latency through a large reasoning budget, slow startup, or repeated failed calls. Do not confuse aggregate hardware throughput or AA-AgentPerf service-level thresholds with measured per-request output speed.
20
-
21
- [Arena's ranking method](https://arena.ai/blog/ranking-method) reports raw scores/ranks alongside confidence intervals and rank spreads. Overlapping rank spreads imply ties; a small raw-score lead is not a reliable win. [Arena's FAQ](https://arena.ai/faq) describes blind human preference and Bradley–Terry ratings. Compare within the same category and snapshot, never creative-writing scores directly against Code scores. Style and verbosity can influence preference.
22
-
23
- Vendor benchmark tables are labeled as such. Different benchmark versions, agent harnesses, effort settings, and token budgets are not a common tournament. Missing measurements are not zero scores, and predecessor results do not become evidence for an unverified exact model name.
24
-
25
- ## Candidate evidence
26
-
27
- Four parallel researchers used Exa discovery and primary-page retrieval. The parent re-fetched the creative-writing leaderboard, Claude effort comparison, and Gemini/DeepSeek provider tables. All 13 exact identities were found; no predecessor was substituted. Arena snapshots below are **October 1 (WebDev)** and **October 2 (Text/creative writing), 2026**. AA figures are retrieval-time observations without a frozen measurement timestamp.
28
-
29
- ### Independent quality and first-party output speed
30
-
31
- AA Intelligence Index figures refer to the current **v4.3.2** scale. Effort is explicit: these are **not all the same configuration**. Output speeds are approximate observations, not guarantees or an average across unlike providers. Source links in each row supply the measurements; the shared Claude comparison supplies both Claude rows.
32
-
33
- | Requested alias | AA Intelligence Index and effort | First-party output tok/sec | Serving source / setting |
34
- | --------------------- | -------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35
- | `opus-5.5` | 54 high; 58 max | 73 high / medium | [Anthropic, adaptive/default fallback](https://artificialanalysis.ai/models/releases/comparisons/claude-sonnet-5-5-vs-claude-opus-5-5) |
36
- | `sonnet-5.5` | 47 high; 36 low; 56 max | 98 high; 88 low | [Anthropic, adaptive/default fallback](https://artificialanalysis.ai/models/releases/comparisons/claude-sonnet-5-5-vs-claude-opus-5-5) |
37
- | `gpt-6.1-sol` | 50 high; 52 max | 63 high; 60 low | [OpenAI provider table](https://artificialanalysis.ai/providers/openai), [quality comparison](https://artificialanalysis.ai/models/releases/comparisons/gpt-6-1-sol-vs-gpt-6-astra) |
38
- | `gpt-6-astra` | 51 high; 53 max | 45 high / medium | [OpenAI provider table](https://artificialanalysis.ai/providers/openai), [quality comparison](https://artificialanalysis.ai/models/releases/comparisons/gpt-6-1-sol-vs-gpt-6-astra) |
39
- | `gpt-6-luna` | 21 low; 37 max | 134 low | [OpenAI provider table](https://artificialanalysis.ai/providers/openai); another indexed comparison says 38 max, a snapshot discrepancy |
40
- | `fable-5.1` | 51 high; 49 medium; 53 max | About 51–54 high; 67.8 max | [Anthropic high](https://artificialanalysis.ai/models/claude-fable-5-1-high), [max](https://artificialanalysis.ai/models/claude-fable-5-1), [effort comparison](https://artificialanalysis.ai/models/releases/claude-fable-5-1) |
41
- | `muse-spark-1.3` | 48 max; 45 xhigh | 202.3 max; 212.1 xhigh | [Meta max](https://artificialanalysis.ai/models/muse-spark-1-3/providers), [xhigh](https://artificialanalysis.ai/models/muse-spark-1-3-xhigh) |
42
- | `grok-4.7` | 46 xhigh | 73.9 xhigh | [SpaceXAI/xAI API](https://artificialanalysis.ai/models/grok-4-7) |
43
- | `glm-5.3` | 45 max | 71.9 max | [Z AI API](https://artificialanalysis.ai/models/glm-5-3) |
44
- | `kimi-k3` | 44 max | 36.4 max | [Kimi API](https://artificialanalysis.ai/models/kimi-k3) |
45
- | `deepseek-v4.1-flash` | 39 max; 25 non-reasoning | 209 max | [DeepSeek provider table](https://artificialanalysis.ai/models/deepseek-v4-1-flash/providers), [quality comparison](https://artificialanalysis.ai/models/releases/deepseek-v4-1-flash) |
46
- | `gemini-3.8-flash` | 41 high; 40 medium; 33 low | About 236–249 high | [Google AI Studio](https://artificialanalysis.ai/models/gemini-3-8-flash/providers), [quality comparison](https://artificialanalysis.ai/models/releases/gemini-3-8-flash) |
47
- | `mimo-v2.6-pro` | 46, effort unspecified | About 37–46, effort unspecified | [Xiaomi model page](https://artificialanalysis.ai/models/mimo-v2-6-pro), [provider page](https://artificialanalysis.ai/models/mimo-v2-6-pro/providers) |
48
-
49
- **Latency changes the practical choice.** The Claude comparison reports Sonnet-low first-answer latency **1.28s**, medium **1.34s**, and high **12.20s**; Opus-high is **35.17s**, medium **24.45s**. Its first-token and first-answer rows duplicate those values, so do not treat them as independent streaming measurements. The OpenAI table displays **2.45s for Luna-low**, **57.26s for Sol-high**, and **58.39s for Astra-high** in a TTFT column; use these only as an answer-latency proxy, not verified raw TTFT. Exact input workload was not established for these Claude/OpenAI extracts.
50
-
51
- Muse-max's provider page distinguishes **24.99s first chunk** from **34.87s first answer** despite its excellent 202.3 tok/sec throughput. Fable-max's provider/model pages report **247.63s first chunk/FAQ-labelled TTFT** at a **10K-input** workload. These are reasons not to choose either as an unqualified low-latency tasker. Muse workload and matched low/high speeds were not established.
52
-
53
- Gemini-high's **10K-input** provider page is internally inconsistent across extracted sections: the table gives **236 tok/sec and 21.76s median first chunk**, while its FAQ gives **248.6 tok/sec and 16.13s first answer**; the researcher's earlier table gave 242 tok/sec. Preserve them as differing displayed samples, not a combined latency decomposition. Low/medium speeds were not verified. DeepSeek's **10K-input** table labels its first-party row **209 tok/sec, 0.95s median first chunk, 12.89s total response, 9.55s reasoning time**; 0.95s is not answer latency.
54
-
55
- For Grok/GLM/Kimi, the model-page FAQs label startup **40.82s / 3.14s / 3.95s** as TTFT respectively, but first-answer delay and selected input workload were not established. MiMo's model page labels **3.78s TTFT**, while its provider FAQ separately reports **47.86s first answer**. Do not compare these unlike startup metrics as one latency ranking.
56
-
57
- **Provider route matters.** DeepSeek's provider FAQ reports **716.9 tok/sec / 3.30s first answer** on LithosAI ULTRA CHAT, versus 209 tok/sec first-party; its separate table shows a different 701 tok/sec sample. MiMo's provider FAQ reports **269 tok/sec / 8.12s first answer** on PrimaLabs, but that extract did not establish workload or effort. These are optional route-specific observations requiring endpoint-equivalence checks, not typical speed for every deployment. The separately named `mimo-v2.6-pro-ultraspeed` and Grok fast variant were excluded.
58
-
59
- ### Arena preference evidence
60
-
61
- WebDev scores measure frontend preferences, while Text Arena's coding subset measures preferences on coding conversations. Their ranks are **not interchangeable**. Dashes mean not established in the collected packet, not an absent model or zero score. Creative-writing entries for every candidate were checked against the same [October 2 table](https://arena.ai/leaderboard/text/creative-writing). Gemini and Fable writing intervals overlap; raw ranks do not establish a winner between them.
62
-
63
- | Requested alias / tested Arena effort | Coding-related Arena category: rank, score | Creative writing: rank, score |
64
- | --------------------------------------- | ------------------------------------------ | ----------------------------- |
65
- | `opus-5.5` max (coding), high (writing) | WebDev #1, 1815 ±16 | #2, 1516 ±20 |
66
- | `sonnet-5.5` xhigh | WebDev #3, 1786 ±18; high #6, 1715 ±13 | #42, 1447 ±24 |
67
- | `gpt-6.1-sol` max | WebDev #4, 1758 ±17 | #27, 1460 ±24 |
68
- | `gpt-6-astra` max | WebDev #2, 1788 ±10 | #39, 1449 ±14 |
69
- | `gpt-6-luna` max | — | #90, 1413 ±14 |
70
- | `fable-5.1` max | WebDev #5, 1749 ±10 | #10, 1482 ±13 |
71
- | `muse-spark-1.3` max | WebDev #14, 1657 ±9 | #28, 1459 ±12 |
72
- | `grok-4.7` xhigh | Text coding #96, 1488 ±16 | #64, 1436 ±16 |
73
- | `glm-5.3` max | Text coding #34, 1521 ±9 | #34, 1454 ±10 |
74
- | `kimi-k3` max | Text coding #9, 1541 ±8 | #26, 1460 ±9 |
75
- | `deepseek-v4.1-flash` max | Text coding #26, 1528 ±12 | #60, 1440 ±15 |
76
- | `gemini-3.8-flash` high | Text coding #22, 1530 ±8, preliminary | #7, 1485 ±9, preliminary |
77
- | `mimo-v2.6-pro`, effort unspecified | Text coding #10, 1540 ±18 | #47, 1446 ±21 |
78
-
79
- Sources: [WebDev](https://arena.ai/leaderboard/code), [WebDev explicit route](https://arena.ai/leaderboard/code/webdev), [Text coding](https://arena.ai/leaderboard/text/coding), [open-weight coding filter](https://arena.ai/leaderboard/text/coding?license=open-source). Filtered MiMo and DeepSeek rows use the **overall category** rank, not their open-weight ranks of 2 and 3.
80
-
81
- ### Task benchmarks and harness effects
82
-
83
- - **Matched independent terminal evidence:** the [AA Claude comparison](https://artificialanalysis.ai/models/releases/comparisons/claude-sonnet-5-5-vs-claude-opus-5-5) reports Terminal-Bench **4.0** at **high**: Opus **56.6%**, Sonnet **43.9%**; at **max**: Opus **59.6%**, Sonnet **63.6%**. The [Sol/Astra comparison](https://artificialanalysis.ai/models/releases/comparisons/gpt-6-1-sol-vs-gpt-6-astra) reports high **51.5% / 54.0%**, max **56.1% / 59.1%**. Sonnet's vendor **70.6%** is not this independent score. Prefer Opus for hard correctness-first work; Sonnet's speed makes it attractive for interactive iteration, not universally stronger at high effort.
84
- - **Matched independent repository evidence:** [DeepSWE](https://deepswe.datacurve.ai/), updated September 22, runs a common mini-swe-agent harness. GLM-max **69% ±3%** and Kimi-max **69% ±5%** overlap. Neither is a demonstrated winner over the other. Vendor releases instead report **66.9 / 67.5**, with their own harnesses and settings. GLM's [official card](https://huggingface.co/zai-org/GLM-5.3/raw/main/README.md) also reports **84.5 CyberGym / 54.4 ExploitBench**; vulnerability-discovery evidence is not a review false-positive evaluation.
85
- - **Muse:** [AA's launch analysis](https://artificialanalysis.ai/articles/muse-spark-1-3) reports Terminal-Bench **2.1** at **85% xhigh / 86% max**, versus Meta's vendor **88.8 max**. Meta's [official scorecard](https://research.meta.ai/articles/introducing-muse-1-3/benchmarks/benchmark-scorecard-v6.webp) gives DeepSWE **75.4**, AutomationBench **49.6**, DeepSearchQA **90.3** at max. Do not mix the launch article's old index **61/62** with the current **45/48** scale.
86
- - **Fable:** [Anthropic's launch](https://www.anthropic.com/claude-fable-and-mythos-5-1) reports Terminal-Bench **4.0 55.8%**, CursorBench **3.2.0 73.4%**, HLE with tools **65.0%**. Production safeguards can fall back to other Claude models on some security/biology interventions; these are not necessarily pure-model results.
87
- - **DeepSeek:** [official card](https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash/raw/main/README.md), maximum effort, reports DeepSWE **74.2** and Terminal-Bench **2.1 90.6**, but **4.0 31.2**. Its Pi-harness scores are **66.2 DeepSWE / 86.1 Terminal-Bench 2.1**, with multi-sample settings. Pi-specific evidence is useful, but is not a prediction for a low-effort, few-call tasker.
88
- - **Gemini:** [official card](https://deepmind.google/models/model-cards/gemini-3-8-flash/) reports DeepSWE **73.7%**, Terminal-Bench **2.1 89.4%**, **4.0 19.1%**; effort/harness was not established from the fetched table. The separately named Cyber variant was excluded.
89
- - **MiMo:** [official checkpoint card](https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Pro-RL/raw/main/README.md) reports DeepSWE **71.9**, Terminal-Bench **4.0 34.9**, Toolathlon-Verified **76.9**, CyberGym **94.0**. API/checkpoint equivalence was not independently established; the release article's RL trajectory ends at **72.6 DeepSWE**, a separate reported result.
90
- - **Grok:** [vendor launch](https://x.ai/news/grok-4-7) reports DeepSWE **71.0% high**, Terminal-Bench **4.0 37.6%** in a mostly xhigh table. Another model-card excerpt says **38.0%** terminal; retain that discrepancy. No Grok row was found on the fetched independent DeepSWE board.
91
-
92
- Official Sol announcement: [API launch post](https://community.openai.com/t/gpt-6-1-sol-in-the-api-a-meaningful-cost-performance-step/1402388), **75.2% DeepSWE high**. Its main launch page was blocked; [the model reference](https://developers.openai.com/api/docs/models/gpt-6.1-sol) confirms the exact identity. Astra's [launch](https://openai.com/index/gpt-6-astra/) was also blocked to direct retrieval; indexed vendor reasoning claims were not needed to decide the shortlist. Luna's weak low-effort index and [Agent Arena](https://arena.ai/leaderboard/agent/overall) max net improvement **1.35% ±1.07%, #25** argue for acceptance-tested mechanical work only; that metric is not task success or Elo.
93
-
94
- ## Role mapping
95
-
96
- These are evaluation shortlists, not runtime routing rules or a claim that every alternate beats every omitted model. Different roles deliberately reuse models. Keep the shipped thinking levels unchanged.
97
-
98
- | Default role | Suggested aliases | Rationale and limitations |
99
- | ------------------ | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
100
- | `architect` / high | `opus-5.5`, `gpt-6-astra`, `fable-5.1`, `kimi-k3` | Opus has the strongest collected high-effort general index and sustained-reasoning evidence; Astra is a strong independent family. Fable offers comparable high-effort reasoning and long-horizon capability, accepting slower serving. Kimi is a long-context, independently capable repository alternative, not an index winner. |
101
- | `coder` / high | `sonnet-5.5`, `gpt-6.1-sol`, `muse-spark-1.3`, `mimo-v2.6-pro` | Sonnet combines fast iteration with strong terminal/frontend evidence; Sol is a quality-first software option. Muse offers useful tool/coding evidence and high output throughput, with substantial startup time. MiMo is a quality-first, multimodal/tool alternative; its slow first-party serving and effort mapping require validation. |
102
- | `reviewer` / high | `gpt-6.1-sol`, `gpt-6-astra`, `opus-5.5`, `glm-5.3` | Sol/Astra/Opus have concrete code-reasoning evidence. GLM adds an open-weight candidate with independent repository results and vendor security evidence. **None has a matched review false-positive or non-mutating precision evaluation here.** Tool restrictions and reproducible findings remain mandatory. |
103
- | `tasker` / low | `gemini-3.8-flash`, `sonnet-5.5`, `deepseek-v4.1-flash`, `gpt-6-luna` | Gemini supports low effort and fast high-mode streaming; exact low-mode speed is unverified. Sonnet has the clearest measured low-effort quality/first-answer balance. DeepSeek is a provider-sensitive throughput option; low effort is unverified. Luna is a cheaper fast option only for mechanical work with explicit checks. |
104
- | `writer` / medium | `opus-5.5`, `gemini-3.8-flash`, `fable-5.1` | These have the strongest collected creative-writing preferences among the requested candidates. Opus is the quality-first starting point; Gemini is the throughput-oriented alternative; Fable is deliberate, premium prose. Arena evaluated high/max, **not medium or voice-preserving edits**, so this is a transfer hypothesis. |
105
-
106
- **Why Grok is not in a final four:** it remains a credible coder/architect alternative with high-effort vendor DeepSWE evidence, but its independent coding/writing preferences and xhigh startup observation did not displace these finalists. This is not a claim that Grok fails those jobs. Kimi is also a credible coder alternate; DeepSeek and MiMo can be security-investigation alternates without proving reviewer precision. Muse's strong coding signals did not make it a top-three writer; Astra's high reasoning index did not override its weaker collected writing preferences.
107
-
108
- ## Exact identity and adapter caveats
109
-
110
- - Claude aliases resolve to `claude-opus-5-5`, `claude-sonnet-5-5`, and `claude-fable-5-1` in official docs: [Opus](https://platform.claude.com/docs/en/models/opus-5-5/overview), [Sonnet](https://www.anthropic.com/claude/sonnet), [Fable](https://platform.claude.com/docs/en/models/fable-5-1/overview). The exact **Fable 5.1** route is verified in this research; predecessor Fable 5 scores were excluded.
111
- - OpenAI references confirm [Sol](https://developers.openai.com/api/docs/models/gpt-6.1-sol), [Astra](https://developers.openai.com/api/docs/models/gpt-6-astra), and [Luna](https://developers.openai.com/api/docs/models/gpt-6-luna). GPT-6.1 Sol is not GPT-6 Sol.
112
- - [Gemini documentation](https://ai.google.dev/gemini-api/docs/models/gemini-3.8-flash) confirms `gemini-3.8-flash` and low/medium/high support; `minimal` is unsupported.
113
- - The requested `deepseek-v4.1-flash` is now used consistently as the **advisory alias**. [DeepSeek's API](https://api-docs.deepseek.com/) calls this version `deepseek-flash`; do not pin the advisory string as a guessed direct-provider ID. Its numeric effort controls require the adapter's actual mapping.
114
- - [GLM](https://huggingface.co/zai-org/GLM-5.3/raw/main/README.md) and [Kimi](https://forum.moonshot.ai/t/kimi-k3-is-here-our-most-capable-model/480) document low/high/max, not a literal medium. [Kimi's limitations](https://www.kimi.com/blog/kimi-k3) warn about excessive proactiveness and unstable quality if historical thinking is not replayed. That matters for architect delegation and the smallest-change contract.
115
- - [Grok docs](https://docs.x.ai/developers/models/grok-4.7) support low/medium/high/xhigh, default high. Do not substitute its fast variant.
116
- - [MiMo API docs](https://mimo.mi.com/models/en-US/mimo-v2.6-pro) confirm the exact model and thinking on/off; a low/medium/high enum was not verified. Check adapter support before applying the coder's high label.
117
- - [Meta's model page](https://developer.meta.com/ai/models/muse-spark/) distinguishes standard `muse-spark-1.3` from `muse-spark-1.3-contributor`, whose requests can improve products. Do not silently substitute the contributor tier for confidential code. [The updated release](https://research.meta.ai/blog/introducing-muse-spark-1-3) confirms max availability; launch-time access statements can be stale.
118
-
119
- ## Availability and validation
120
-
121
- Resolve an actual provider/model ID and supported tool/effort configuration before pinning anything. These advisory lists do not alter the existing thinking levels, tool policies, or runtime selection. Validate finalists on representative local jobs: accepted patches for coder, confirmed defects and false positives for reviewer, plan coverage for architect, exact acceptance checks and full latency for tasker, and blind voice-preservation preferences for writer.