Operating the pipeline
Every piece of pipeline work is a row in PostgreSQL: which version, which stage, how many attempts, and what went wrong last. Workers claim these rows, retry failures, and set aside work that keeps failing. This page shows how to see that state and act on it.
Running operator commands
The operator commands are part of the remember CLI, under
remember ops. They talk to PostgreSQL directly rather than to the API, so
they run inside the engine image, where the database settings already are.
Run them with docker compose exec api remember ops …; the image enables
them, so no extra setting is needed.
Read the deployment id from .env once per shell:
DEPLOYMENT_ID=$(grep '^REMEMBERSTACK_SELFHOST_DEPLOYMENT_ID=' .env | cut -d= -f2)Then run each command in the api container:
docker compose exec -T api \
remember ops inspect --deployment "$DEPLOYMENT_ID"Every remember ops command prints one JSON document on standard output.
Pipe it through python3 -m json.tool to read it.
| Command | What it does |
|---|---|
remember ops inspect --deployment ID | Report pipeline, dead-letter, projection and consistency state |
remember ops replay PROCESSING_ID --deployment ID | Give one dead-lettered item more attempts |
remember ops resume-no-route --deployment ID | Release conversions parked for lack of a route |
remember ops graph-catalog ensure | Check and repair the PostgreSQL graph views and functions |
remember ops cost-export --deployment ID | Print one page of the cost ledger (Observability) |
Inspect the pipeline
docker compose exec -T api \
remember ops inspect --deployment "$DEPLOYMENT_ID" | python3 -m json.toolThe report has five parts:
| Field | Contents |
|---|---|
routes | For each stage and lane, how many items are in each status (pending, running, succeeded, failed while waiting to retry, dead_letter, skipped), split by defer_reason: no_route, admission or budget for parked work, scheduled for work due later, retry_backoff for a failure waiting to retry, null otherwise. A large pending count with no reason on one stage shows where the pipeline is behind. |
dead_letters | Items that ran out of attempts: a total, groups by stage and error class, and individual items with their processing_id, attempts and last_error. |
poison_targets | Items that dead-lettered under two or more component versions: an upgrade did not fix them. |
latest_projections | Historical projection metadata; live corpus readiness is checked per requested document through /readiness. |
currency | A consistency check between each claim's cached "current" flag and the ledger it is derived from. mismatch_total should be 0. |
Lists in the report are capped at REMEMBERSTACK_OPERATIONAL_SAMPLE_LIMIT
entries (default 20).
Retries and dead letters
When a stage fails on an item:
- A retryable failure, such as a provider timeout or a
5xx, is retried after a back-off: 2 seconds after the first failure, doubling each time, never more than 60 seconds (REMEMBERSTACK_WORK_RETRY_BACKOFF_BASE_S,REMEMBERSTACK_WORK_RETRY_BACKOFF_MAX_S). - An item gets 3 attempts in total: the first try and two retries.
- A non-retryable failure, such as a file that cannot be converted, goes straight to the dead letters.
- An item that uses its last attempt goes to the dead letters.
- A worker that dies while running an item (killed, out of memory,
restarted) stops renewing its hold on the item. Once the hold runs out
(
REMEMBERSTACK_WORK_LEASE_S, 60 seconds by default), another worker puts the item back in the queue, or sends it to the dead letters if that was its last attempt. Thelast_errorthen starts withlease expired.
OpenRouter capacity errors can retry inside the provider call, including error-only HTTP 200 responses. If capacity stays unavailable, the worker uses the stage's remaining attempts.
With Qwen3-Embedding-8B pinned to OpenRouter's nebius/bf16 route with zero
data retention and fallbacks off, new chunk grids split passages that exceed
16,384 model tokens. Adding the same sole host to the provider order also
activates these checks. Error-only HTTP 200 capacity responses can retry even
when they carry a request ID. An input above the ceiling or an explicit size code from
OpenRouter or its upstream provider dead-letters as embedding.input_too_large.
The size code takes precedence over a wrapper's generic rejection or capacity status.
Other explicit per-input rejections dead-letter as embedding.input_rejected,
including an upstream invalid_embedding_input wrapped in HTTP 502.
These checks also cover error-only HTTP 200 responses. Malformed vector batches
use the stage's retry budget.
last_error includes the chunk ID, the rendered input hash and the binding.
A dead-lettered item stays where it is. Its version is not ready, and the work after it in the pipeline waits. Nothing retries it on its own.
Replay a dead letter
Find the processing_id in the dead_letters.items of the inspect report,
fix the cause (a key, a model, a converter route), then replay it:
docker compose exec -T api \
remember ops replay 3f2a9c1e-8b7d-4e21-9a0f-5c6d7e8f9a0b --deployment "$DEPLOYMENT_ID"| Option | Default | Meaning |
|---|---|---|
--attempts N | 1 | How many more attempts to grant |
--lane steady|backfill | the item's lane | Run it in another lane |
--not-before 2026-09-24T08:00:00+00:00 | now | Do not run it before this time |
The command prints the item's new state: its route, attempts,
max_attempts and not_before. The worker for that stage picks it up.
Parked conversions
An uploaded file whose MIME type has no conversion route is parked with the
reason no_route rather than failed. It uses no attempts. After you add a
route and restart with docker compose up -d, release it:
docker compose exec -T api \
remember ops resume-no-route --deployment "$DEPLOYMENT_ID"The output lists the released processing_id values. Items whose MIME type
is still unrouted stay parked. See File formats and converters.
Spend budgets
A budget caps what one pipeline stage may spend on model calls, in US dollars, within a fixed time window. Before a worker runs an item, it checks the budget for that stage and lane. If the window's spend has reached the ceiling, the item is parked until the window ends, and the worker moves on. Nothing is dropped.
REMEMBERSTACK_WORK_BUDGETS is a JSON list; each entry names the
deployment, the stage, the lane (steady or backfill), the window in
seconds, and the ceiling:
# .env
REMEMBERSTACK_WORK_BUDGETS=[{"deployment_id":"<your deployment id>","stage":"extract_claims","lane":"steady","window_seconds":86400,"ceiling_usd":"5.00"},{"deployment_id":"<your deployment id>","stage":"normalize_relations","lane":"steady","window_seconds":86400,"ceiling_usd":"5.00"}]Only one budget may exist per deployment, stage and lane. Stages without a budget are not capped.
Put it in .env and run docker compose up -d; the workers enforce it.
Work a budget parked shows as pending with defer_reason budget, both
in remember ops inspect and in readiness.
The spend itself is in the cost ledger; read it with remember ops cost-export (Observability).
The graph catalog
The memory's graph is a set of PostgreSQL views over the stored relations,
plus the functions that walk them and the database roles and grants they
use. Migrations create them. If a manual database change or a restore leaves
them missing or different, remember ops graph-catalog ensure compares them
with what this release expects, recreates them if needed, and reports the
result:
docker compose exec -T api \
remember ops graph-catalog ensureThe output has ready, changed, problems_before and problems_after.
It also checks the versions of pgvector,
pg_textsearch and pg_partman.
Forgetting a document
A forget erases one document and everything derived only from it. Request it
with remember documents forget DOC_ID (or
POST /documents/{doc_id}/forget,
the SDKs, or the forget_document MCP tool), and follow it with
remember forget list and remember forget status FORGET_ID. Nothing else in
the deployment stops while a forget runs.
- The hide. In one database transaction the document, its versions, passages and testimony disappear from every read, and its queued or running work can no longer be claimed or renew its lease. A forget record is written: IDs and content hashes only, never text.
- The sweep. A
forgetjob then deletes the document's rows, its objects (including retained object versions), its corpus folders and the corpus navigation that listed it, and the compiled knowledge pages that cited it, with their summaries and writer transcripts; ordinary knowledge work rebuilds those pages from what remains. Compiled pages keep no Git history (each publication replaces the previous set), so no old version of them is left to erase. It sweeps again after a quiet period (REMEMBERSTACK_SELFHOST_FORGET_QUIET_PERIOD_S, 15 minutes by default) and repeats until a sweep finds nothing left; the record then becomescomplete. A failed sweep records an error code on the record and is retried with backoff, without an attempt limit. - Authored knowledge pages. The engine never rewrites prose a person or
agent wrote. An authored page or curation sidecar whose current file still
names the document (its ID, a version ID, or a fact it supported) is listed
on the record, which ends as
waiting_for_redaction; an authored page also gets a review flag withredaction_required. Remove the citation and any text quoted from the document, and commit: the knowledge plane's next sync rewrites that file's Git history and completes the forget, also when the facts layer is off. A file whose current version is already clean but whose older revisions named the document has those revisions rewritten by the sweep. Rewritten history has new commit IDs, so clones of the knowledge repository must fetch it again. - Re-ingest. Ingesting the same bytes or the same source (
source_kindandsource_ref) again is refused with409 document_forgotten; connectors skip the file. To add the content back on purpose, ingest it withallow_forgotten(remember ingest --allow-forgotten) once the record is no longererasing; it comes back under a newdoc_id. The flag applies to that one request; there is no setting that turns the refusal off.
After restoring a backup
Forget erases the active stores; your backups follow your own policy. After you restore object storage, the corpus bucket or the knowledge repository from a backup taken before a forget, re-run the sweeps of every forget the database still records:
docker compose exec -T api \
remember ops forget-reapply --deployment "$DEPLOYMENT_ID"It prints the forget IDs it re-armed; ordinary workers run the sweeps, and nothing waits for them. A database restored from before a forget no longer has that forget's record: forget the document again.
Limits
- PostgreSQL erasure is logical: no later query or dump returns the content, but
old row versions stay in table files and write-ahead log until PostgreSQL
overwrites them. Forget does not run
VACUUM FULL. - An operator-managed S3 FUSE mount stops listing the document when its cache expires; a file already open in such a tool may keep serving what it read until it is closed. See filesystem views.
- A worker stalled for longer than the quiet period after the hide could still write once; the quiet period is set longer than a work lease for this reason.
- Knowledge-page erasure follows citations in committed content: text copied into a page without citing the document, uncommitted or staged edits in a working copy, and tags that point directly at files are outside it.