Wait until a document is queryable
Ingest returns in a second; processing takes minutes. Until it finishes, a question about the new document gets an answer that does not include it, and nothing in that answer tells you so. This page shows how to wait for exactly the versions you sent, how long to wait, and what to do when a version fails.
Setup is in the Quickstart. What each stage does is in The pipeline and readiness.
Wait from the CLI
Set VERSION_ID to the version_id returned by remember ingest.
remember readiness "$VERSION_ID" --wait --timeout 1800Pass several version IDs to wait on them together. Omit --wait for one
readiness report. Add --require-p3 if your next step reads the published
corpus. On timeout the command exits with status 1. It prints the last
successful report to stdout if a check returned one, and includes the last
request error on stderr if a check failed. See remember readiness.
Wait with the Python client
import remember
client = remember.Client.from_env()
version = client.ingest(
"notes/2026-09-17-standup.md",
source_kind="file",
source_ref="notes/2026-09-17-standup.md",
)
report = client.wait_for_readiness([version.version_id])
print(report.ready)wait_for_readiness(version_ids, *, timeout=1800.0, poll_interval=15.0, require_p3=False) checks the deployment at once and returns the report
when every listed version is ready. It waits poll_interval seconds
between successful checks. The defaults are 30 minutes and 15 seconds.
Raise timeout for bulk loads. If the deadline passes first, TimeoutError
carries the last successful report in report and the last retryable request
error in last_error. Each is None when there is no corresponding result.
It checks three capabilities for you: the pipeline stages for your
versions, the search index (p1) and the live graph (live_graph). Pass
require_p3=True only if you also read the published corpus folders
(filesystem views on a self-hosted deployment).
wait_for_readiness accepts version IDs as strings or UUIDs. A readiness
check covers at most 1,000 versions; split larger lists.
A version with created=False needs no new processing, but wait on it
anyway: the earlier run of the same bytes may still be going, and a
finished one returns ready on the first check.
Wait with the TypeScript client
Pass the version_id from ingest to waitForReadiness.
const report = await client.waitForReadiness({ versionIds: [versionId] });The options timeoutMs and pollIntervalMs take milliseconds. On timeout,
TimeoutError carries report and lastError when available.
Poll through temporary outages
Both SDKs and remember readiness --wait keep polling through temporary
connection failures, request timeouts, and HTTP 502, 503, 504, and
524. They also retry a server error that explicitly sets retryable: true.
Consecutive failures double the retry delay from 2 seconds up to 30 seconds.
The configured poll interval is the minimum gap between checks. A successful
check restores the normal interval. All retries count toward the original
deadline.
Stop on failure
Non-retryable errors, such as HTTP 401 or a server error that sets
retryable: false, stop the wait immediately.
A stage that is failed has a retry scheduled and can still succeed, so
wait_for_readiness keeps waiting through it. A stage that is
dead_letter has used all its attempts and will never become ready, so
wait_for_readiness stops at the first check that shows one and raises
remember.PipelineDeadLettered:
import remember
try:
client.wait_for_readiness([version.version_id])
except remember.PipelineDeadLettered as error:
for version_id, stage, status in error.dead_lettered:
print(f"{version_id}: {stage} is {status}")
# error.report is the full readiness report that showed the dead letter.dead_lettered lists every (version_id, stage, status) that is
dead-lettered, and the message names them too. What to do next is under
When a version fails.
The p3 check uses the same per-version guard as document search's
p3_path. An unrelated publish cannot satisfy it. A ready single-version
request exposes its export digest as version; multiple versions return
version: null, and built_at / published_at are always null. A matching
marker records publication once, not an atomic tree or an independently
restored bucket. A missing local mount does not invalidate a remote publish.
Read the report
pipeline_readiness and wait_for_readiness return a
PipelineReadinessReport:
| Field | Meaning |
|---|---|
ready | True when every required capability is ready. |
versions[] | One entry per version: version_id, ready, and stages[]. |
versions[].stages[] | stage, component_version, status, finished_at, defer_reason. |
capabilities | pipeline, p1, live_graph, p3, each with required, ready, checked_at and a reason. |
model_bindings, build_revision, document_binding_generation | Which code and models are serving, for your records. |
A stage status is one of missing, pending, running, succeeded,
failed, dead_letter, skipped. A version is ready when every expected
stage has succeeded or been skipped and has a finished_at. A
missing stage with blocked_by is waiting for the named dead-lettered
stage to succeed after operator replay. For example, a dead letter in
adjudicate_supersession blocks reconcile and label_relation. Claim
embedding runs on its own branch. The SDK and CLI request this detail
automatically. For direct HTTP requests, add ?include_blockers=true.
A pending stage with a defer_reason of no_route is parked: it will not
move until an operator adds a conversion route, so waiting does not help.
With budget, a spend budget has reached its ceiling: the work resumes by
itself when the budget window ends, or sooner if an operator raises the
ceiling. With admission, a metered deployment has measured the file and
waits for its control plane's approval; the work resumes once it is approved.
Capability reasons when not ready:
| Capability | Reason | Meaning |
|---|---|---|
pipeline | stage_incomplete | At least one stage of one version has not finished. |
pipeline | stage_dead_lettered | With include_blockers=true, at least one stage needs operator intervention. |
p1 | search_channel_incomplete | The search index is not ready. |
live_graph | a graph_… reason, such as graph_catalog_mismatch | The live graph failed its catalog or health check. This is a deployment problem, not a problem with your document. |
p3 | corpus_publication_incomplete | A requested served version has no matching publication marker yet. |
p3 | p3_version_not_served | A requested historical edition is not the corpus's served reading. |
The check reads state; it never starts or speeds up work.
When a version fails
failedmeans the last attempt failed and a retry is scheduled; it can still succeed. Retries after a dependency outage may wait longer, with at least twenty minutes before the second retry.dead_lettermeans the work requires operator intervention.- Stuck at
pendingon the first stage on a self-hosted deployment usually means the file's MIME type has no converter: the version is parked until one is configured. See File formats and converters. - On a self-hosted deployment, the operator can inspect and replay dead-lettered work. See Operating the pipeline.
Re-sending the same bytes does not restart a failed version: identical bytes are a no-op.
Over HTTP
POST /readiness takes the version IDs and an explicit requirement for
each of the four capabilities:
curl -sS "$REMEMBER_API_URL/readiness" \
-H "Authorization: Bearer $REMEMBER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"version_ids": ["6f1c2d0e-8a3b-4d5e-9f10-2a3b4c5d6e7f"],
"require": {"pipeline": true, "p1": true, "live_graph": true, "p3": false}
}'The body is at most 1,000 version IDs. It is a read: a read-only token may call it. See Ingest, readiness, documents.
Over MCP
An agent uses the pipeline_readiness tool with the arguments the
ingest tool returned in pipeline.poll_with:
{
"name": "pipeline_readiness",
"arguments": {
"version_ids": ["6f1c2d0e-8a3b-4d5e-9f10-2a3b4c5d6e7f"],
"require": {"pipeline": true, "p1": true, "live_graph": true, "p3": false}
}
}Both the tool's description and the ingest result spell out the poll
algorithm. Your agent's instructions should say the same:
- Wait about 30 seconds after ingest before the first check.
- Then check every 30 to 60 seconds, backing off gently. Never check more often than every 15 seconds.
- A
failedstage is retrying: keep polling, and describe it as retrying if you report progress. - Stop at once if any
stages[].statusisdead_letter, and report theversion_idand that stage. - After 20 to 30 minutes without
ready: trueand without a dead letter, stop and escalate to the operator with theversion_idand the laststages[].
Require pipeline, p1 and live_graph, and set p3 to false unless
the agent also reads a published corpus folders. ready: true means the
assured operations can see the content; whether a given question finds it
still depends on relevance.
An ingest that returned created: false started no new processing, but an
earlier run of the same bytes may still be going. Check readiness:
ready: true means the content is already queryable. Otherwise poll it
exactly as above, stopping only on dead_letter or the time limit.