PUBLIC BETA OFFER

Save 50% off on an Eligible Learning PlanValid for 1-month plan, 3-month plan, 12-month plan · Code LPXBETA50 · Ends Dec 6, 2026

Implement error propagation strategies across multi-agent systems

Carry failure causes, partial evidence, and dependency status into selective recovery.

Distinguish a successful empty query from denied access, timeouts, and incomplete pagination. A partial policy search shows how workers preserve useful findings and recovery history without turning a located policy reference into customer eligibility or a completed answer.

Knowledge domain
Context Management & Reliability
Topics & tags
Published
Author
LearningPathX Editorial TeamContent version 1.0
Resources

Implement error propagation strategies across multi-agent systems

Learning objectives

Return actionable failure context, distinguish a successful empty search from unavailable evidence, and recover locally without hiding failures. Preserve partial work while preventing dependent tasks from proceeding on missing prerequisites.

Return enough context for a decision

“Search unavailable” does not explain whether credentials were denied, a query was invalid, the service timed out, or one page succeeded before another failed. A coordinator needs the failure type, attempted operation and scope, attempts already made, trustworthy partial results, and plausible next steps.

Keep diagnostic detail useful and appropriately filtered. Do not return credentials or an unbounded stack trace merely to be specific. Preserve source IDs, revision, and coverage for partial results. A worker's last output may contain useful evidence, but it is not automatically validated or complete.

Distinguish absence from failed access

A valid empty result means a successful query completed with no matches in its stated scope. It does not prove that the fact is absent from all systems. A timeout or permission denial means the attempted access did not establish the answer.

Outcome Supported conclusion Possible next step
Complete successful query, zero matches No matches within that query's scope Accept the scoped result or deliberately broaden the query
Permission denied Scope could not be examined with current authority Obtain approved access or route to an authorized owner
Read timeout Result is unavailable or incomplete Bounded safe retry or alternative authorized source
One page returned, next page failed Known partial matches; total coverage incomplete Preserve page one and recover the failed continuation

An envelope reporting successful generation without the required structured payload is not automatically a valid empty search. Inspect the operation's actual contract and completion fields. Missing data, an empty array, and a failed extraction are distinct states.

Recover locally within explicit bounds

A worker can retry a transient read under the configured attempt and time limits, correct an invalid parameter, or use an authorized equivalent source. Retain attempts and consumed resources even when recovery succeeds. Escalate unresolved errors with the recovery history so the coordinator does not unknowingly repeat the same failed sequence.

Do not retry a permanent authorization failure with the same request and expect different authority. Do not replay an uncertain write without checking whether it took effect or using an idempotency mechanism. A timeout describes the observation, not proof that the remote action never happened.

A clean local recovery can return the accepted result plus relevant attempt metadata. A terminal error, unresolved prerequisite, or reduced coverage must remain visible. Graceful degradation means providing bounded useful results, not relabeling failures as success.

In this invented policy-search workflow, the coordinator asks for policy references covering refunds and delivery. The worker successfully reads section 3 of the refund policy, then times out while reading delivery documents. It has made two delivery-read attempts under its local limit.

This application-level failure packet preserves the state:

{
  "task_id": "policy-scan-R7",
  "status": "partial_failure",
  "failure_type": "read_timeout",
  "attempted_query": {"collection":"delivery-policies","query":"delivery eligibility"},
  "attempts_used": 2,
  "partial_results": [
    {"source":"refund-policy-v2","location":"section 3","scope":"refund eligibility","support":"compared with supplied text"}
  ],
  "coverage": {"refunds":"examined","delivery":"incomplete"},
  "alternatives": ["Retry delivery read if the coordinator authorizes remaining budget", "Use an approved cached delivery snapshot and disclose its revision"]
}

The coordinator can retain the refund evidence and recover delivery separately. It cannot conclude that no delivery policy exists. If the delivery decision depends on an effective date absent from a cached snapshot, that alternative may remain insufficient even if the read succeeds.

A supported final synthesis is: "A refund-policy reference was located and section 3 was read. Customer-specific refund eligibility has not been evaluated because no customer facts or eligibility decision were returned. The delivery-policy search remains incomplete because the required collection could not be fully read." This is an honest partial result, not a completed two-area answer.

Prevent dependent-task stalls

Track tasks with explicit pending, running, completed, failed, and blocked states. Use deadlines, heartbeats, or a completion channel to detect a worker that may no longer be progressing. A missed heartbeat is a signal to investigate, not proof that the worker has stopped or that its side effects were rolled back.

When an upstream task fails, identify its dependents. Continue genuinely independent work. Block tasks that require the missing result, or use a documented fallback that supplies equivalent prerequisites. Switching every dependent to “standalone mode” can produce unsupported decisions if the required evidence is still absent.

For reassignment, coordinate ownership. A plain file named task.lock is not a complete distributed lock: claiming must be atomic, stale claims need a recovery policy, and an old worker must not later publish a conflicting result. Use an appropriate lease, fencing, or equivalent coordination design for the environment. Do not reassign an uncertain side effect merely because a local status file appears stale.

Preserve useful state without a full restart

Store accepted artifacts and checkpoints with input revision, completed scope, validation status, and pending work. Resume from a verified boundary when possible. A checkpoint of unvalidated intermediate text is not equivalent to a completed phase.

A complete workflow restart is justified when the underlying assumptions or shared state are invalidated. It should not be the automatic response to one independent read failure. Conversely, a single failure may legitimately stop the whole workflow if it affects a mandatory safety or authorization prerequisite. Failure handling follows dependency and risk, not a universal rule that all errors must be ignored or all errors must terminate everything.

Validate propagation and reporting

Exercise successful empty, permission denied, transient read recovery, exhausted retry, partial pagination, and uncertain-write cases. Check that failure status reaches the coordinator and that coverage remains incomplete until the missing work is actually completed.

In the final result, distinguish supported findings, unresolved areas, and hypotheses. Name the source and check that justify a support label. A worker's “verified” field or confidence statement is not sufficient on its own. Preserve failed attempts and the actual recovery path in the internal record.

Preserve the client and final-output distinctions

In the supplied client snapshot, transient capability-discovery requests such as tools/list, prompts/list and resources/list can retry up to three times with short backoff; authentication/4xx/timeouts are excluded from that automatic policy. This does not govern every tool invocation, model request or subagent, and “not automatically retried” does not prove a permanent cause. The snapshot also describes provider/search configurations where failed server connections are not surfaced to the model. Preserve that visibility gap instead of calling the service healthy, absent or successfully empty.

The local source describes foreground text produced before an API cutoff as partial output with an incomplete note. No content or tool-calls-only output can yield Agent terminated early due to an API error plus detail; it separately records a historical v2.1.199 tool-calls-only cutoff-note shape. Background runs are marked failed and report API error plus last output. Keep actual host/version/output shape distinct; neither partial text, a tool request nor an error note is a completed finding. Retry/resume is proposed only after the actual underlying issue clears and the saved state is suitable.

Use actual final subtype, errors and required payload presence/type/schema together. success without required structured_output fails this workflow, not a normal empty domain search. error_max_structured_output_retries can reflect validation exhaustion or fallback retraction; an earlier retracted payload is not usable unless a valid final replacement survives. One label does not prove the unique cause or permanent irreparability.

Expected application records could be {"status":"success_empty","query":"delivery policy","scope":"collection D revision1","results":[]}, {"status":"access_failed","query":"delivery policy","scope":"collection D revision1","error":"read_timeout","results":null}, and {"status":"required_output_missing","model_subtype":"success","required_payload_present":false}. These are distinct application examples, not a universal vendor error envelope. Only the first supports a scoped no-match conclusion.

Exercise bounded recovery and artifact identity

For a teaching heartbeat, suppose the last observed update is 12:00 UTC, a five-minute observation deadline expires at 12:05, and the coordinator checks at 12:06. This establishes a missed observation under that policy, not worker death. A delayed channel or partition can hide a live worker. Inspect actual ownership and dependencies before bounded recovery; dependent operations remain blocked until prerequisites are available. A replacement needs legitimate ownership release/recovery and fencing of the old actor, not deletion of a stale-looking filename. Under this teaching policy the lapse threshold includes 12:05: at 12:04 no deadline lapse is established, at 12:05 and 12:06 it is flagged for assessment, and a missing last-update timestamp remains unknown rather than timed out. None of these states proves worker death.

A local read policy might permit two attempts within a shared coordinator budget, with an authorized bounded backoff and applicable rate-limit instructions between attempts. Count local and coordinator retries together to avoid retry multiplication. A read timeout may allow a safe retry; an uncertain write requires state inspection or idempotency before replay. After exhaustion, propagate real error, attempts, useful partials and remaining coverage. On actual recovery, validate the returned content and required scope before changing the task status.

For a separate teaching allocation, let the worker perform at most two read attempts and cap the entire task at three attempts shared by all actors. These are invented application limits, independent of the client discovery retry policy. After the worker consumes two attempts, at most one coordinator read attempt remains, and it still needs current authority, a cleared transient issue and a safe operation. The following EXPECTED exhaustion record assumes that the permitted third read also times out:

{"task_id":"budget-example-R8","worker_attempt_limit":2,"task_attempt_limit":3,"attempts":[{"number":1,"actor":"worker","operation":"read delivery policies","outcome":"read_timeout"},{"number":2,"actor":"worker","operation":"read delivery policies","outcome":"read_timeout"},{"number":3,"actor":"coordinator","operation":"read delivery policies","outcome":"read_timeout"}],"attempts_used_total":3,"remaining_attempts":0,"status":"partial_failure","retained_scope":"The previously checked refund-policy reference remains available; delivery remains incomplete.","next_action":"Propagate the error and partial coverage; no further read retry is permitted under this allocation."}

The expected total is two worker attempts plus one coordinator attempt, not two attempts newly granted to each actor. A later coordinator cannot reset that counter by reassignment. The actual returned content and required coverage would still need validation if an allowed attempt succeeded; exhaustion here preserves failure and does not establish that no delivery policy exists. This is a static application example, not an observed retry, a universal SDK limit or a delivery-time guarantee.

Store recovery records in actual authorized artifacts with task/input/source revision, attempt identity, content fingerprint, checked-versus-unchecked portions, completed side effects and pending work. Before resuming, verify the referenced bytes exist, are accessible, match the intended inputs, and that the original failure condition has actually cleared. An inaccessible or changed checkpoint stays a gap; replan/restart if appropriate. Selective retrieval must retain decisive conditions, not merely the favorable summary. External storage neither proves completeness nor eliminates cost. When recovery or access diagnosis depends on a workspace, account or credential identity, record the required nonsecret identity or approved secret reference in the authorized recovery record. Keep actual keys, tokens and passwords out of prompts, packets and logs; knowing a reference neither permits retrieving its secret nor authorizes an operation.

The source's 25,000-token response default and advice to make smaller targeted searches are interface snapshots, not proof of this failure's cause or guaranteed lower total cost. Preserve truncation/coverage status. Inspect actual query/parameter/source-selection/response traces, then test the affected path after a supported correction. A heartbeat symptom, too few tool calls or an overloaded-context hypothesis is not yet a verified root cause.

Complete a mixed-coverage synthesis

In a separate mixed-coverage teaching variant, the supplied input is: refund-policy-v2, section3, says “Refund requests require an order ID and receipt; eligibility is assessed separately.” That quote supports “the listed documents are required by this supplied section,” not “this customer qualifies.” A page1 delivery excerpt says “Standard parcels use rule D,” but page2 containing exceptions could not be read. Preserve the limited page1 finding as partial; do not assume no exception applies. A third requested international-delivery policy is inaccessible and remains unknown.

The expected synthesis is: “Supported within refund-policy-v2 section3: the quoted order-ID/receipt requirement; customer-specific eligibility unassessed. Partial delivery finding: page1 names rule D; exceptions on unread page2 remain unknown. International-delivery rules: unavailable; no conclusion.” The coordinator retains refund evidence, recovers page2 within authorized remaining budget or uses an adequate approved revision, and keeps international decisions pending. This is expected teaching output, not an actual policy adjudication or completed recovery.

The source's PCIe rate and official_documentation_v2.pdf/NVLink examples are conceptual placeholders without the cited original attachments here; their “verified” labels do not establish current hardware facts. Likewise, CLAUDE.md is onboarding guidance and pointers, while detailed source systems provide precise facts. Tests, scripts and screenshots establish only their actually checked behavior and scope. Missing required verification remains a concrete gap, and a prompt, architecture description or screenshot grants no deployment authority.

Read the source sketches at their actual limits

The source's conceptual try/except builds failure_type, attempted_query, partial_results and error_message. It calls execute_tool, get_partial_state and format_tool_result and catches ToolError without defining those helpers or that exception. It does not include the separately promised alternative approaches. The policy-search packet above supplies an actual alternatives list and complete stipulated recovery context; it is an application-level expected record, not proof that the undefined source framework runs.

The allocation sketch is literally tasks/{task_id}.lock # created by the claiming agent; one occurrence is labeled JSON even though this path and comment are not a JSON value. Another sentence calls it a priority queue or first-creator-wins mechanism. Neither establishes atomic exclusive creation, owner identity, lease expiry, safe release, fencing or matching checkpoint bytes. Do not implement concurrent replacement merely by testing whether that name exists or looks stale.

MCP expands to Model Context Protocol; the glossary name alone establishes no universal retry, provider-visibility, discovery, invocation or subagent-execution policy. For the source capability-discovery visibility caveat, the stated condition is tool search being disabled or unsupported; it names Amazon Bedrock and Google Cloud's Agent Platform as examples where failed server connections are not reported to the model. This is a local client/provider snapshot, not a current external verification or a claim that every request on either platform has that behavior. Preserve unknown connection state, and keep the list-request retry policy separate from actual tool execution and subagent recovery.

Summary

Make errors carry enough evidence for selective recovery. Keep empty results separate from inaccessible evidence, retain trustworthy partial work, and respect dependency gates. A useful failure report supports the next decision without disguising what remains unknown.

PUBLIC BETA OFFER

Save 50% off on an Eligible Learning Plan

Valid for 1-month plan, 3-month plan, 12-month plan · Code LPXBETA50 · Ends Dec 6, 2026