paperclipai/paperclip · error
Photon edits require an immutable Paperclip publication…
Error message
Photon edits require an immutable Paperclip publication identity
What it means
Photon's editMessage is deliberately unimplemented: it always throws 'Photon edits require an immutable Paperclip publication identity'. Like postMessage, editing published Photon messages is refused because it would mutate content bound to an immutable publication identity.
Solutions
- Do not edit Photon messages; post a new publication or update state in Paperclip instead.
- Gate edit paths behind an adapter capability flag and fall back to no-op or new-message for Photon.
- Handle the thrown error in edit flows so a failed edit does not abort the surrounding workflow.
Example fix
// before
await adapter.editMessage(chatId, messageId, updated);
// after
if (adapter.capabilities?.canEdit) {
await adapter.editMessage(chatId, messageId, updated);
} // else: leave published message immutable
Defensive patterns
Strategy: type-guard
Validate before calling
if (!adapter.capabilities?.canEdit) return; // Photon edits unsupported
Type guard
const canEdit = (a: unknown): a is AdapterWithEdit => (a as AdapterWithEdit).capabilities?.canEdit === true;
Try / catch
try {
await adapter.editMessage(chatId, messageId, updated);
} catch (e) {
if (e.message.includes("edits require")) { await publishFollowup(chatId, updated); return; }
throw e;
} Prevention
- Gate edit flows behind per-adapter capability flags.
- For Photon, publish corrections as new messages instead of editing.
- Handle the capability error explicitly in shared edit helpers.
When it happens
Trigger: Any call to adapter.editMessage(chatId, messageId, message) on the Photon adapter.
Common situations: Shared messaging code that updates an earlier message (e.g. progress or status edits) across all adapters; retry logic that re-sends an edited payload through editMessage.
Related errors
- Photon message deletion is not supported
- Photon sends require an immutable Paperclip publication…
- rejected
- Photon message belongs to another chat
- ACPX runtime does not expose session goal controls
AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-09-18).
Data as JSON: /api/errors/7002255f067016ea.
Report an issue: GitHub.
Appendix: source
Thrown at server/src/services/photon/adapter.ts:387
if (!this.closed)
await this.client.chats
.setTyping(this.decodeThreadId(id).chatGuid, false)
.catch(() => {});
}
async postMessage(
_id: string,
_message: AdapterPostableMessage,
): Promise<never> {
throw new Error(
"Photon sends require an immutable Paperclip publication identity",
);
}
async editMessage(
_id: string,
_messageId: string,
_message: AdapterPostableMessage,
): Promise<never> {
throw new Error(
"Photon edits require an immutable Paperclip publication identity",
);
}
async deleteMessage(): Promise<never> {
throw new Error("Photon message deletion is not supported");
}
async addReaction(): Promise<void> {
/* Receipt reactions are intentionally not published. */
}
async removeReaction(): Promise<void> {
/* Reactions never represent approvals. */
}
async publish(
id: string,
publicationId: string,
message: AdapterPostableMessage,
options: {View on GitHub (pinned to 3f1d897a7c)