Skip to Content
QueenReplanning + retries

Replanning + retries

Real work fails. A Worker gets stuck, a Drone rejects a result, or the plan turns out to assume a world that no longer exists. The Queen treats failure as a first-class part of orchestration, not an exception — she has a graduated set of responses, escalating only as far as each situation demands.

The failure matrix

When a task fails or its review is rejected, the Queen works through these responses in order:

failure ─▶ retry (adjusted instructions) └─ still failing ─▶ escalate to a different Worker └─ still failing ─▶ replan the affected sub-tree └─ blocked ─▶ escalate to you

Retry with adjusted instructions

The first response is to try again — but not blindly. The Queen feeds the failure reason and the review feedback back into the task, so the next attempt is informed by what went wrong rather than repeating it.

Escalate to another Worker

If a task keeps failing for one Worker, the Queen reassigns it to a different one. Workers have different strengths, and a task that one CLI agent struggles with often lands cleanly with another.

Replan the affected sub-tree

When the failure is structural — the task graph itself no longer fits reality — the Queen replans. She isolates the failed task and everything downstream of it, preserves the work already done, asks the planner for a fresh sub-graph using the original spec plus the execution log so far, and patches it back into the plan. This convergence loop lets the Swarm self-heal locally without re-running tasks that already passed. Replans are capped so a stubborn failure cannot loop forever.

Escalate to you

When retries, reassignment, and replanning are exhausted — or the blocker is something only you can resolve — the Queen stops and asks.

You are pulled in as the last resort, not the first. The Queen escalates to you only after automated recovery has been exhausted (for example, the replan cap is reached) or when the decision genuinely requires a human — an ambiguous requirement, a missing credential, or a product call. When that happens she surfaces a prompt in your Hive with the context she has gathered.

What recovery costs

Recovery has a Honey cost on the server side: every replan is another Queen planning pass and every re-review runs the Drones again. A plain retry re-runs your Worker CLI, which bills against your own subscription rather than Honey. The Queen’s graduated approach is deliberate — cheaper responses first — so she does not spend a full replan on something a single adjusted retry can fix.

  • Execution loop — how tasks reach the point where these responses kick in.
  • Planning a spec — clearer specs mean fewer failures to recover from.