Skip to content

Every fleet spawn is dispatched twice (8/8 today); spawn survives only because agent names collide #1604

Description

@khaliqgant

Every fleet spawn is dispatched twice — 8 of 8 today

Every spawn action issued in one session today produced two distinct invocation IDs. The second consistently fails with spawn_agent_name_in_use.

Sample pairs (first succeeded, second refused):

inv_216916774968586240  ->  {"spawned": true}
inv_216916775043461120  ->  spawn_agent_name_in_use

inv_217025730618630144  ->  {"spawned": true}
inv_217025730630524928  ->  spawn_agent_name_in_use

inv_217248326977896448  ->  {"spawned": true}
inv_217248327020621824  ->  spawn_agent_name_in_use

The IDs are near-adjacent, consistent with two near-simultaneous dispatches of one caller action rather than a retry after a failure — no failure precedes the second.

8 spawn calls, 8 duplicate pairs, 0 exceptions. Both local (chief-broker) and remote (sf-mini, daytona-1538-verify-0817b) targets.

Why this is currently harmless, and why that is the problem

Nothing bad happens for spawn — the agent-name uniqueness constraint refuses the second attempt, so exactly one agent starts and the name is never burned. I verified the roster holds exactly one record per name each time.

That safety is incidental. It comes from a name-collision check that exists for a different reason, not from the dispatch path being idempotent. So the open question is not "is spawn broken" — it is:

Are other fleet actions dispatched twice as well, and do any of them lack an equivalent guard?

An action without a natural uniqueness key — anything that appends, increments, charges, enqueues, or writes — would execute twice with no signal. That is the same class of defect as AgentWorkforce/factory#211 (duplicate dispatch across surfaces), which was merged today. This one sits in the transport underneath it.

What would settle it

  1. Whether the duplication is in the caller (MCP tool invocation), the relay dispatch path, or the node handler.
  2. An inventory of fleet actions and which have a natural idempotency guard. Spawn happens to. release, and anything that mutates counters or queues, may not.
  3. If duplication is intended (at-least-once delivery), then it should be stated, and every action handler should be idempotent by contract rather than by luck.

Reproduction

Issue any spawn through the MCP fleet action and watch the invocation stream. Two action.completed / error events arrive with different invocation_ids for a single call.

Filed as an observation with complete evidence rather than a diagnosis — I have not read the dispatch path, and I am not claiming to know where the fork is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions