stablyai/orca · warning

Too many artifact creates are waiting for recovery. Retry an

Error message

Too many artifact creates are waiting for recovery. Retry an earlier share.

What it means

Thrown by getOrCreateArtifactCreateIntent() when the intents directory already holds MAX_PENDING_ARTIFACT_CREATES (32) or more .json files after pruning temporary intents. The cap prevents unbounded recovery backlog from a chronically-failing cloud-create. Each pending intent represents a share create that never confirmed.

Source

Thrown at src/main/artifacts/artifact-create-intent-store.ts:204

}

export function getOrCreateArtifactCreateIntent(
  profileId: string,
  userDataPath: string,
  sourceKey: string,
  scope: ArtifactShareScope,
  idempotencyKey: string,
  body: ArtifactWriteBody
): ArtifactCreateIntent {
  const existing = getArtifactCreateIntent(profileId, userDataPath, sourceKey, scope)
  if (existing) {
    return existing
  }
  const directory = ensureIntentDirectory(profileId, userDataPath)
  removeTemporaryIntents(directory)
  const pendingCount = readdirSync(directory).filter((name) => name.endsWith('.json')).length
  if (pendingCount >= MAX_PENDING_ARTIFACT_CREATES) {
    throw new Error('Too many artifact creates are waiting for recovery. Retry an earlier share.')
  }
  const intent: ArtifactCreateIntent = {
    version: 1,
    sourceKey,
    scope,
    idempotencyKey,
    body
  }
  const serializedIntent = JSON.stringify(intent, null, 2)
  if (Buffer.byteLength(serializedIntent, 'utf8') > MAX_ARTIFACT_CREATE_INTENT_BYTES) {
    throw new Error('Artifact create recovery record exceeds the supported size.')
  }
  writeIntent(intentPath(profileId, userDataPath, sourceKey, scope), directory, serializedIntent)
  return intent
}

export function removeArtifactCreateIntent(
  profileId: string,

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Recover or clear earlier pending creates first — retry/flush the existing 32 shares (or deliberately abandon them) to drop below the cap.
  2. Diagnose why creates are not confirming: check cloud connectivity, auth (740/743), and that removeArtifactCreateIntent is called on success.
  3. If the backlog is genuinely stale, clear the intents directory for the profile and re-share from a known-good state.

Example fix

// before
getOrCreateArtifactCreateIntent(...) // 32 pending -> throws

// after
// flush stale pending intents first
for (const stale of listPendingIntents(profileId, userDataPath)) {
  await retryCreateOrAbandon(stale)
}
getOrCreateArtifactCreateIntent(...)
Defensive patterns

Strategy: validation

Validate before calling

import { readdirSync } from 'node:fs'
import { MAX_PENDING_ARTIFACT_CREATES, ensureIntentDirectory } from '...'

function pendingIntentCount(profileId: string, userDataPath: string): number {
  const dir = ensureIntentDirectory(profileId, userDataPath)
  return readdirSync(dir).filter((n) => n.endsWith('.json')).length
}

if (pendingIntentCount(profileId, userDataPath) >= MAX_PENDING_ARTIFACT_CREATES) {
  await flushOrAbandonPendingIntents(profileId, userDataPath) // recover/clear before queueing
}

Type guard

null

Try / catch

try {
  return getOrCreateArtifactCreateIntent(profileId, userDataPath, sourceKey, scope, idempotencyKey, body)
} catch (e) {
  if ((e as Error).message === 'Too many artifact creates are waiting for recovery. Retry an earlier share.') {
    await flushOrAbandonPendingIntents(profileId, userDataPath)
    return getOrCreateArtifactCreateIntent(profileId, userDataPath, sourceKey, scope, idempotencyKey, body)
  }
  throw e
}

Prevention

When it happens

Trigger: Repeatedly attempting to share new artifacts while prior creates stay unrecovered (network down, cloud auth failing, app crashing before confirmation). The backlog hits 32 and the next create is refused.

Common situations: The cloud endpoint is unreachable for an extended period and the user keeps queuing shares; a bug prevents create-confirmation from clearing intents; an automation hammers share-create on a broken connection.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/1e86f19c8987072f. Report an issue: GitHub.