You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Queue excess spawn_agent runs instead of capping in a prompt
Workers report queued until a burst slot is free. Nested children
bypass the window so a full fleet cannot deadlock wait_agents.
Retryable 429s freeze new admits through the shared retry policy.
Copy file name to clipboardExpand all lines: docs/ARCHITECTURE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,7 +207,7 @@ Three distinct concepts (do not conflate them):
207
207
|**Task**| A checklist item owned by _one_ agent via `manage_tasks`| Local work plan — not a spawn |
208
208
|**Sub-agent**| A short-lived child agent for one self-contained job | Spawned with **`spawn_agent`**, collected with **`wait_agents`**|
209
209
210
-
The **`spawn_agent`** tool starts a sub-agent on a separate inference source (tier/profile resolved from settings) and returns immediately with an `agent_id`; **`wait_agents`** collects reports later. The dispatch brief separates durable `context`, actionable `prompt`, and optional `goals` (checklist seeds for the _child's_ own `manage_tasks` list). The child returns a structured report (`Summary` / `Findings` / `Blockers` / `Paths`) plus a tools-used footer. Parent and child never share a `manage_tasks` list.
210
+
The **`spawn_agent`** tool starts a sub-agent on a separate inference source (tier/profile resolved from settings) and returns immediately with an `agent_id`; **`wait_agents`** collects reports later. Declared fan-out is unlimited: excess dispatches enqueue rather than fail. `run()` is admitted by `src/subagent/admission.ts` (default burst window 8 concurrent worker runs). Nested children of an already-admitted parent bypass the cap so a nested orchestrator cannot deadlock while holding a slot on `wait_agents`. Queued workers report wait/list status `queued` (live, not failed). Lowering capacity never cancels in-flight work. Short provider 429s freeze new admits via the shared retry remapper in `createCorbitsRetryPolicy`; `quota_exhausted` does not freeze. `list_agents` remains mailbox-scoped. The dispatch brief separates durable `context`, actionable `prompt`, and optional `goals` (checklist seeds for the _child's_ own `manage_tasks` list). The child returns a structured report (`Summary` / `Findings` / `Blockers` / `Paths`) plus a tools-used footer. Parent and child never share a `manage_tasks` list.
211
211
212
212
When profiles exist (local `.agents/agents/` and/or enabled **`kind: "agent"`** plugins, including **data-only** markdown plugins with no `index.ts`), the chat model also receives **`search_agents`** — a lexical index over profile id, description, and role text so the model can discover ids before calling `spawn_agent(agent=...)`. Results include each match's full loaded system prompt / body so the parent can inspect plugin or Claude marketplace agents without `read_file` on paths outside the session cwd (path-escape blocks those roots by design; writes remain blocked). `spawn_agent` and `search_agents` are core tools on the primary session.
Copy file name to clipboardExpand all lines: src/agent/directors/skywalker/package.ts
+2-3Lines changed: 2 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -65,11 +65,10 @@ When the operator (or brief) gives an http(s) URL to read:
65
65
66
66
# Effort scaling (IMPLEMENTATION / ORCHESTRATION)
67
67
68
-
Scale fan-out to the ask — no numeric worker ceiling pretends to enforce itself:
68
+
Scale fan-out to the ask — the runtime queues excess rather than refusing:
69
69
- Simple (answer, one-path lookup, tiny fix): 0–1 worker, few tools; often answer without fleet
70
70
- Tiny single-file / one-route asks: **DIY on the parent** with write_file/edit_file; skip spawn, skip explorer, skip critic. Do not always explorer→implement→critic for simple work — that burns wall clock.
71
-
- Multi-lane work: spawn only named, non-overlapping lanes (distinct path/package/ownership). Width follows the ask and clear non-overlap — not a soft numeric ladder.
72
-
Prefer synthesizing early returns over launching a second wave.
71
+
- Multi-lane work: spawn only named, non-overlapping lanes (distinct path/package/ownership). Width follows independent lanes; the runtime queues excess rather than refusing. Do not invent a numeric cap.
0 commit comments