Skip to main content

Module subagents

Module subagents 

Source

Structs§

AgentSwarmChildResult
Outcome of a single resolved swarm child entry.
AgentSwarmChildSpec
One ordered child to dispatch as part of a swarm.
AgentSwarmCompleted
Emitted when the agent_swarm tool finishes, carrying the aggregate child outcome counts.
AgentSwarmConfig
Tunable scheduler/bounds for swarm fanout.
AgentSwarmModeChanged
Emitted when agent-swarm mode is toggled on a runtime/thread.
AgentSwarmProgress
Emitted each time a swarm child resolves, so a client can render a live “N/total done” progress tick between AgentSwarmStarted and AgentSwarmCompleted rather than only the final result.
AgentSwarmProgressSnapshot
A running tally of swarm children as they resolve, used for live progress. resolved is completed + failed + aborted; clients can render resolved/total as a progress bar without tracking individual children.
AgentSwarmRequest
Parsed agent_swarm tool input, before any child is dispatched.
AgentSwarmResult
Aggregated, ordered swarm result returned to the lead model.
AgentSwarmStarted
Emitted when the agent_swarm tool begins fanning out children, so any app-server/SDK/TUI client can observe the swarm as a whole. Per-child progress flows through the existing Subagent* trace events.
SubagentDefinition
SubagentLanePreset
SubagentRequest
SubagentResult
UltraModeChanged
Emitted when ultra mode is toggled on a runtime/thread. Ultra mode enables proactive multi-agent delegation for any model (not only Codex Sol/Terra Ultra effort).

Enums§

AgentSwarmBatchViolation
Why a batch of tool calls violates the agent_swarm exclusivity rule: agent_swarm must be the only tool call in a single model response.
AgentSwarmChildKind
Whether a swarm child is a fresh spawn or a resume of an existing agent.
AgentSwarmChildOutcome
Final outcome of a single swarm child.
AgentSwarmChildState
Whether an aborted child had started running before cancellation.
AgentSwarmModeTrigger
How a swarm-mode session was entered.
AgentSwarmValidationError
Reasons an agent_swarm request is rejected before any child starts.
SubagentExitReason
SubagentLane
SubagentPermissionMode
UltraModeTrigger
How ultra mode was entered. manual is a persistent /ultra on toggle; task is a one-shot /ultra <prompt>. Only manual stays active across turns. Selecting Codex Sol/Terra Ultra reasoning still enables proactive multi-agent for that model without flipping this mode flag.

Constants§

AGENT_SWARM_INITIAL_LAUNCH_LIMIT
Default number of children that may start immediately before pacing applies.
AGENT_SWARM_LAUNCH_INTERVAL_MS
Default pacing interval between additional child launches, in milliseconds.
AGENT_SWARM_MAX_SUBAGENTS
Default upper bound on swarm child count. Config may lower but not exceed it.
AGENT_SWARM_MODE_REMINDER
Canonical swarm-mode reminder injected into a turn’s developer instructions (server-side) while agent-swarm mode is active, so the model reaches for the agent_swarm fanout tool. Shared by the runtime injection and the TUI label so the wording stays in one place.
AGENT_SWARM_PROMPT_PLACEHOLDER
Literal placeholder replaced with each agent_swarm item value.
AGENT_SWARM_RATE_LIMIT_BASE_BACKOFF_MS
Default base backoff between rate-limit retries, in milliseconds (doubled each subsequent attempt: 3s, 6s, 12s, …).
AGENT_SWARM_RATE_LIMIT_MAX_RETRIES
Default number of times a child is retried after a provider rate limit before it is reported as failed.
AGENT_SWARM_RATE_LIMIT_MAX_RETRIES_CAP
Hard cap on rate-limit retries so config/env can never make a swarm wait unboundedly.
AGENT_SWARM_RATE_LIMIT_RECOVERY_INTERVAL_MS
Default quiet window after which the swarm recovers one unit of global rate-limit capacity, in milliseconds (3 minutes). Any fresh rate limit restarts the window, and recovery happens at most once per quiet window.
AGENT_SWARM_RATE_LIMIT_SHRINK_INTERVAL_MS
Default minimum interval between successive global rate-limit capacity shrinks, in milliseconds. While the provider keeps rate-limiting, the swarm shrinks its global capacity by one at most this often, so it throttles smoothly instead of collapsing on the first burst of 429s.
AGENT_SWARM_TOOL_NAME
Canonical model-facing swarm tool name. Single source of truth shared by the tool registration (roder-ext-subagents) and the core turn loop’s exclusivity enforcement (roder-core).
SUBAGENT_SUMMARY_CONTRACT
ULTRA_MODE_REMINDER
Canonical ultra-mode reminder for one-shot /ultra <prompt> turns. Persistent ultra mode injects proactive multi-agent policy server-side instead of prepending this to the user-visible transcript.

Traits§

AgentSwarmProgressSink
Sink the runtime supplies on a tool-execution context so the agent_swarm tool can publish live progress snapshots (carrying the runtime’s thread/turn ids and the bus emitter) without the tool depending on roder-core.
SubagentDispatcher

Functions§

agent_swarm_batch_violation
Detect whether a batch of tool-call names violates the agent_swarm exclusivity rule. Returns None when the batch is valid: no agent_swarm call, or exactly one agent_swarm call by itself.
build_agent_swarm_specs
Validate an AgentSwarmRequest and build the ordered child specs.
built_in_subagent_lane_presets