Semogram Docs
Forecasting and predictionsRun and operate

Failures and recovery

Handle uncertain dispatch, cancellation and new invocations without duplicating work

Prediction recovery depends on what failed: a lost client response, queued delivery, model execution or an external operation. Reusing an invocation key, re-delivering queued work and making a new forecast are different actions. There is no general public MCP resume-from-checkpoint action for failed predictions.

You need a Semogram account with project access. Invocation needs queries:execute, reading needs project read access and cancellation needs runs:execute. Owner-controlled external-operation reconciliation additionally requires workspace ownership.

Choose the action

SituationAction
Client lost forecast_run responseRetry the identical request/key or inspect its retained result
Known prediction stays QueuedInspect prediction/workflow identity and authorized delivery jobs
Completed output existsInspect it; do not rerun because the client disconnected
Schema/model/evidence failurePreserve failed record, fix/test configuration and deliberately create a new prediction
Pending or uncertain remote operationEstablish provider outcome before further work
Outcome query failedInvestigate outcome resolution; do not rerun the original forecast to settle it

The stale-queued sweeper re-delivers eligible queued work. It is not a failed-prediction retry service. Workflow-start uncertainty retains dispatch identity to avoid silently starting a second execution.

Investigate and cancel

Open the prediction, inspect error/provenance and use Cancel while the invocation is queued or running. Read back the resulting state. A completed or failed record is not an active cancellation target.

Recovery investigation prompt
Inspect this equipment prediction without running another. Determine whether it is queued, running, failed or completed. Report its pinned version, error, evidence and any available external-operation diagnostics. If I decide to cancel, target this exact prediction ID. Do not assume cancellation reverses a provider operation.

First read prediction_get. For an approved cancellation of an active prediction:

Cancel an active prediction
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"prediction_cancel","arguments":{"id":"<ACTIVE_PREDICTION_UUID>","confirm":true,"idempotencyKey":"<UNIQUE_CANCEL_KEY>"}}}

On a workspace connection add projectId. The id here is the prediction UUID, not the forecaster ID.

There is no public /api/v1 prediction cancellation or resume route. Cancellation preserves the record and guards later workflow status updates; an already sent external request can still have committed.

Uncertain external operations

Agentic execution can call configured HTTP specialists or plugin tools. The runtime records intent before remote work. A remote commit followed by a lost response or receipt-save failure can leave the operation uncertain. It is not automatically executed again.

An owner must inspect provider receipts and the stopped workflow before using the available owner-authenticated reconciliation path. The recorded outcome is a human attestation with provider reference and explanation; it is not automatic provider verification. A committed operation also needs its actual result. Reconciliation is not an exposed general MCP/public API action or a promise that the prediction becomes Completed.

If your interface does not expose that administrative path, retain prediction/operation IDs and involve the workspace owner. Do not invent a tool name or treat absence of a receipt as proof of non-commit.

Deliberate rerun example

P-101 failed because its output did not match the configured probability schema. Inspect the saved error, correct the forecaster prompt/schema and test it on bounded equipment evidence. Saving creates a new executable version.

Run P-101 again with a new idempotencyKey and a new future seven-day evaluation date. Retain both prediction IDs and note why the second invocation was made. The new run has new evidence/window/version context; it is not a retrospective replacement for the earlier forecast.

If the old execution called a side-effecting specialist, reconcile that effect first. A new invocation key does not deduplicate arbitrary remote operations across prediction records.