paperclipai/paperclip · error
workflow eval run ${input.runId} is missing
Error message
workflow eval run ${input.runId} is missing What it means
completeWorkflowRun in the live workflow executor looks up the run identified by input.runId in the eval adapter's snapshot of runs. When no run with that id exists in the adapter snapshot, it throws this error instead of silently completing. The check guards against completing results for runs that were never started or were already discarded.
Source
Thrown at packages/paperclip-runner/src/eval/live-workflow-executor.ts:155
async function completeWorkflowRun(
adapter: CapabilityMockControlPlaneAdapter,
input: {
runId: string;
sessionId: string;
source: string;
disposition: "done" | "blocked";
summary: string;
},
): Promise<void> {
const terminal: PrpTerminalState = {
schema: "paperclip.prp.terminal.v1",
turnTerminalState: "completed",
runTerminalState: "succeeded",
reportedWorkDisposition: input.disposition,
};
const current = adapter.snapshot().runs.find((run) => run.id === input.runId);
if (current === undefined) {
throw new Error(`workflow eval run ${input.runId} is missing`);
}
if (current.result !== null) return;
if (
!current.events.some(
(event) => "eventType" in event && event.eventType === "run.terminal",
)
) {
await adapter.appendEvent({
schema: "paperclip.prp.event.v1",
sourceEventId: `${input.source}:terminal:1`,
sourceSeq: 1,
sourceInstanceId: input.source,
sourceKind: "runner",
runId: input.runId,
normalizedSessionId: input.sessionId,
turnId: `${input.source}-turn`,
eventType: "run.terminal",
schemaVersion: 1,View on GitHub (pinned to 01ad858492)
Solutions
- Log the adapter.snapshot().runs ids and confirm input.runId matches one of them.
- Re-create or re-register the run before calling completeWorkflowRun.
- Ensure the same adapter instance that started the run is used to complete it.
- If the run is legitimately gone, treat completion as a no-op instead of throwing (check existence first).
Example fix
// before
await executor.completeWorkflowRun({ runId: staleRunId, disposition: 'completed' });
// after
const exists = adapter.snapshot().runs.some((r) => r.id === staleRunId);
if (exists) await executor.completeWorkflowRun({ runId: staleRunId, disposition: 'completed' }); Defensive patterns
Strategy: try-catch
Validate before calling
const runExists = adapter.snapshot().runs.some((r) => r.id === input.runId);
if (!runExists) throw new Error(`refusing to complete unknown run ${input.runId}`); Type guard
function runIsKnown(adapter: EvalAdapter, runId: string): boolean {
return adapter.snapshot().runs.some((r) => r.id === runId);
} Try / catch
try {
await executor.completeWorkflowRun(input);
} catch (err) {
if ((err as Error).message === `workflow eval run ${input.runId} is missing`) {
logger.warn({ runId: input.runId }, 'run vanished before completion; skipping');
return;
}
throw err;
} Prevention
- Use the same adapter instance for scheduling and completing runs.
- Persist runIds together with the adapter/session identity so stale ids are detectable.
- Log snapshot run ids on mismatch to speed up diagnosis.
- Reset runIds whenever the executor or adapter is recreated.
When it happens
Trigger: Calling completeWorkflowRun (directly or via advanceDelegationReturnMockState) with a runId that was never registered on the adapter, a runId from a previous executor instance, or one whose snapshot was reset before completion.
Common situations: Stale runId persisted from an earlier eval session; typos or id drift between the matrix definition and the executor; re-running an eval against a fresh adapter without re-creating runs; concurrency where a run was removed between scheduling and completion.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- workflow eval delegation checkpoint is missing
- session_unavailable
- goal_not_found
- provider turn ended with status ${turn.status}
- Job not found
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-09-10).
Data as JSON: /api/errors/0c056b9ec3e003a0.
Report an issue: GitHub.