{"version":"2.1.269","anchor":"agentspawn-hook-dispatch-reworked-behind-an-xs-check-wh","canonical_anchor":"agentspawn-is-now-a-true-fire-and-forget-launch-with-a-p","heading":"Changes to how subagents are spawned with $.agent.spawn","tier":"use","area":"Subagents","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269\/e\/agentspawn-hook-dispatch-reworked-behind-an-xs-check-wh","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.269","markdown":"### Changes to how subagents are spawned with $.agent.spawn\n\n$.agent.spawn gained fire-and-forget background launches with per-session budgets, a returned agentId, and hook-gated dispatch\n\n**Unclear.** What determines whether the internal check passes is not established by the evidence.\n\n**What**\n\n- `$.agent.spawn` can now be launched as fire-and-forget: a spawn wrapper enforces a budget of 50 spawns per session and at most 4 concurrently running agents per plugin, then returns a 'started' result immediately without waiting for the agent to finish, letting it keep running in the background; failures surface later only through a log line.\n\n- On success, `$.agent.spawn` results now include an `agentId` field alongside the existing model\/text\/isError fields.\n\n- The `agent.spawn` hook pipeline now only runs (with its 'started'\/dispose telemetry) when enabled by a check; otherwise it returns a no-op object that does nothing on start or dispose.\n\n- The debug log line for a hook that rewrites a subagent's model on spawn no longer includes what the model ultimately resolves to, only the raw before\/after model strings.\n\n**Why** These changes make spawning subagents more flexible for background\/plugin use cases (not every spawn needs to block and wait), while adding guardrails (budgets, concurrency limits) to prevent runaway spawning, and giving callers an id to track the agent they started.\n\n- Area: Subagents\n- Names: `agent.spawn`\n- Tier: Use it now\n- Useful: 4\/5\n- Signal: 3\/5"}