paperclipai/paperclip · error · Error

Saved channel delivery identity could not be read. Check…

Error message

Saved channel delivery identity could not be read. Check Activity before starting another send.

What it means

`readBoardSendDraft` parses a retained board-send draft from storage and validates its shape (recipient, string publication id, known publication state, non-negative integer attempts). If the stored JSON parses but fails this schema validation, it throws this error because the saved delivery identity is corrupt and reusing it could duplicate or misattribute a channel send.

Solutions

  1. Clear the offending localStorage key (or use a versioned key bump) so a fresh draft is written on next send.
  2. Wrap `readBoardSendDraft`/`saved` in try-catch, discard the invalid draft, and prompt the user to check Activity before resending.
  3. Add a schema version field to stored drafts and migrate or invalidate on mismatch.

Example fix

// before
const draft = saved(key);
// after
let draft;
try { draft = saved(key); }
catch { localStorage.removeItem(key); draft = null; /* surface 'check Activity' hint */ }
Defensive patterns

Strategy: try-catch

Validate before calling

function isRetainedBoardSend(v: unknown): boolean { const o = v as any; return !!o && typeof o.to === 'string' && typeof o.publication?.id === 'string' && Number.isSafeInteger(o.publication?.attempts); }

Type guard

const isRetained = (v: unknown): v is RetainedBoardSend => { const o = v as RetainedBoardSend; return !!o && typeof o.to === 'string' && !!o.publication && typeof o.publication.id === 'string' && CHAT_PUBLICATION_STATES.includes(o.publication.state); };

Try / catch

let draft: RetainedBoardSend | null = null; try { draft = readBoardSendDraft(key); } catch { localStorage.removeItem(key); promptCheckActivity(); }

Prevention

When it happens

Trigger: Reading a draft persisted by an older app version with a different schema; manual tampering with localStorage; a truncated/partial write from a previous crashed write.

Common situations: App upgrade changed RetainedBoardSend shape (e.g. publication fields added); user cleared/edited localStorage; storage quota caused a truncated write previously.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-09-18). Data as JSON: /api/errors/08d3d93aec07ea57. Report an issue: GitHub.

Appendix: source

Thrown at ui/src/components/chat/board-send-draft.ts:117

        value.attachmentNames.length !== value.attachmentIds.length ||
        new Set(value.attachmentNames.map((file) => file?.id)).size !==
          value.attachmentNames.length ||
        !value.attachmentNames.every(
          (file) =>
            file &&
            typeof file.id === "string" &&
            value.attachmentIds!.includes(file.id) &&
            typeof file.name === "string",
        ))) ||
    (value.publication !== null &&
      (!value.publication ||
        typeof value.publication.id !== "string" ||
        !value.publication.id ||
        !CHAT_PUBLICATION_STATES.includes(value.publication.state) ||
        !Number.isSafeInteger(value.publication.attempts) ||
        value.publication.attempts < 0))
  )
    throw new Error(
      "Saved channel delivery identity could not be read. Check Activity before starting another send.",
    );
  return value as RetainedBoardSend;
}

export function writeBoardSendDraft(key: string, value: RetainedBoardSend) {
  // This is a delivery identity, not a best-effort text draft. The caller must
  // stop before POST when storage fails; otherwise reload could create a duplicate.
  sessionStorage.setItem(key, JSON.stringify(value));
}

export function clearBoardSendDraft(key: string) {
  sessionStorage.removeItem(key);
}

/** A terminal selected row alone cannot release a still-running batch. */
export function canDismissBoardSendBatch(
  batch: ChatPublicationBatchStatus | undefined,

View on GitHub (pinned to 3f1d897a7c)