﻿# Flyte 2 traces: a successful helper checkpoint is different from a failed external attempt

Design Flyte 2 trace boundaries around agent operations by separating successful recorded outputs, failed calls, task caching and external side-effect uncertainty.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-flyte-two-trace-success-checkpoint-replay-boundary/
Language: en

## The helper failed after a remote operation

An agent task calls a search service through a traced helper, then invokes a summarizer. A later failure triggers recovery. Reusing a recorded successful search can be valuable because repeating a changing search may produce different evidence. But an unsuccessful helper call creates another question: did the remote service accept the request before the local failure?

Separate a completed helper result from an attempted external operation. A checkpoint is evidence of recorded success, while a timeout can leave the remote outcome uncertain. These are different states even if the agent ultimately returns a response.

## Successful traces create the replay boundary

The [trace guide](https://www.union.ai/docs/v2/flyte/user-guide/tasks/task-programming/traces/) describes fine-grained resumption for helper operations and states that only successful trace executions are recorded in the checkpoint system. A failed helper propagates its exception to task code rather than supplying a successful checkpoint value.

Choose a boundary whose returned result contains the information downstream logic needs. Recording only a display message while later consulting mutable global state would leave the actual computational dependency outside that boundary.

## Nondeterministic decisions need deliberate treatment

The [execution caveats](https://www.union.ai/docs/v2/flyte/user-guide/migration/flyte-2/gotchas-and-caveats/) explain that changing runtime decisions can launch different downstream actions after recovery. A current-time branch or changing external lookup can therefore alter an agent's path.

Preserve decision inputs intentionally when reproducible recovery is required. [Random-state replay](/journal/data-guide-data-rng-state-replay/) illustrates a related requirement: replaying a control path is not equivalent to resetting every source of nondeterministic behavior automatically.

## Task caching is a separate scope

The [caching guide](https://www.union.ai/docs/v2/flyte/user-guide/tasks/task-configuration/caching/) describes caching complete task outputs. Trace checkpoints operate inside task logic. Explain which mechanism supplied a reused result before interpreting whether an external search or model call actually happened again.

This distinction also affects measurements. A returned cached answer is not a fresh latency observation for the original external operation. The evaluation record should identify reuse when comparing alternative agent implementations or estimating actual executed work.

## Test recovery and side effects separately

Exercise a controlled failure after a successful helper, and verify which recorded value recovery uses. Then test the external failure window independently using the destination's request identity and outcome evidence.

[Terminal request consistency](/journal/provider-terminal-request-record-consistency/) helps explain why the absence of a successful local checkpoint is not proof of no remote effect. Trace resumption makes agent control flow more observable, but the external system still defines its own completion and deduplication contract.
