﻿# A Prefect future wait is not a successful result

Prefect future wait observes execution without returning the task result; a bounded wait can finish with pending work, while result retrieval can surface failure.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-prefect-future-wait-result/
Language: en

## Keep the task handle separate from its answer

A research flow submits several source checks and receives future objects. Those objects identify ongoing executions; they are not the extracted documents. The [task reference](https://reference.prefect.io/prefect/tasks/) shows submission and deferred execution returning futures, followed by waiting or result retrieval. A report assembler should consume the resulting evidence, rather than stringify a handle and mistake its presence for a completed source check.

## Understand a bounded wait's return

The [future implementation](https://raw.githubusercontent.com/PrefectHQ/prefect/main/src/prefect/futures.py) allows `wait` to stop waiting after its timeout without returning the task's output. The concurrent future's wait path returns when its wait expires. This is a limit on observation time; that return does not independently establish that the underlying task completed or stopped. A caller that needs a completed artifact must inspect the execution state or retrieve the result under the appropriate policy.

## Retrieve output with explicit failure behavior

The [futures reference](https://reference.prefect.io/prefect/futures/) separates waiting and result methods. Result retrieval can raise for failure, and its timeout behavior differs from a quiet bounded wait. Decide whether a source-check failure should abort assembly or be recorded as an unavailable source. Suppressing an exception deliberately changes what the caller receives; it does not turn the original failed execution into a successful observation of the document.

## Interpret collection completion carefully

The collection-level `wait` returns sets named `done` and `not_done`. A completed or cancelled execution can be in the completed set; membership does not mean a useful document was obtained. These are sets, so keep an explicit mapping between future identity and source identity when presentation order matters. Pair each completed execution with its state and usable result before describing coverage across the requested source list.

## Preserve unfinished work in the report contract

If the wait budget expires, label outstanding checks as unfinished rather than silently omitting them or declaring them empty matches. [Task budgets](/journal/learn-codex-task-budgets/) clarify how long the collector may wait; [tool observations](/journal/learn-codex-tool-observation/) capture what it actually learned. The distinction lets a reader understand whether a missing source was rejected, failed, cancelled or simply still running when the report's evidence window closed.
