ACAgentic Craft

Intermediate~12 minHazelJS

Agent Handoff

Transfer goals and minimal state between agents or to humans without dumping full transcripts unsafely.

Authors
editorial-team
Published
Last reviewed

Problem

Context is lost—or over-shared—when work moves across agents or to support staff.

Context

Escalation, specialist transfer, and human takeover paths.

Forces and constraints

  • Receivers need enough context to continue
  • PII must not flood handoff channels
  • Durable runs may suspend for humans

Recommended design

Pass structured handoff payloads (goal, entities, last tool results summaries)—not raw histories. Use @Delegate for peer calls; durableSuspend for human takeover. Redact secrets.

Minimal pseudocode

// Peer handoff via @Delegate (documented peer call-as-tool)
// Human handoff via durableSuspend + approveAndResume
const waiting = await runtime.execute('triage', goal);
await runtime.approveAndResume(waiting.executionId, {
  approved: true,
  approvedBy: 'oncall@example.com',
});

Failure modes

  • Handoff of secrets
  • Missing goal in payload

Security considerations

  • Redact; authenticate human receivers

Observability signals

  • Handoff events on timeline

Evaluation approach

Handoff success without re-asking known facts

Trade-offs

  • Lean payloads vs lost nuance

Sources

Related patterns