thedotmack/claude-mem · error

push response did not ack the canary op

Error message

push response did not ack the canary op

What it means

Error "push response did not ack the canary op" thrown in thedotmack/claude-mem.

Source

Thrown at workers/sync-hub/canary/canary.ts:247

		const res = await fetch(`${this.args.hub}/v1/sync/ops`, {
			method: "POST",
			headers: { ...this.headers(deviceId), "Content-Type": "application/json" },
			body: JSON.stringify({
				protocol_version: 2,
				ops: [{ body, operation_sha256: operationSha256 }],
			}),
			signal: AbortSignal.timeout(this.args.timeoutMs),
		});
		this.noteMode(res);
		if (!res.ok) {
			throw new Error(`push ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
		}
		const parsed = (await res.json()) as {
			acked: Array<{ operation_sha256: string; seq: string }>;
			head_seq: string;
		};
		const ack = parsed.acked.find((a) => a.operation_sha256 === operationSha256);
		if (!ack) throw new Error("push response did not ack the canary op");
		return { seq: ack.seq, headSeq: parsed.head_seq, opSha: operationSha256 };
	}

	private async pull(
		deviceId: string,
		since: string,
	): Promise<{ ops: Array<{ seq: string; operation_sha256: string }>; headSeq: string }> {
		const res = await fetch(`${this.args.hub}/v1/sync/changes?since=${since}&limit=500`, {
			headers: this.headers(deviceId),
			signal: AbortSignal.timeout(this.args.timeoutMs),
		});
		this.noteMode(res);
		if (!res.ok) {
			throw new Error(`pull ${res.status}: ${(await res.text().catch(() => "")).slice(0, 200)}`);
		}
		const parsed = (await res.json()) as {
			ops: Array<{ seq: string; operation_sha256: string }>;
			head_seq: string;

View on GitHub (pinned to d768ba3643)

Solutions

  1. Check the sync-hub push handler for why the op was not acknowledged (validation failure, deduplication, or ack list bug).
  2. Rerun the canary against a fresh hub state; if reproducible, compare the operation_sha256 sent with the acked array returned.

When it happens

Trigger: Fires in the sync-hub canary when the push endpoint returns 200 but the acknowledgment set does not contain the canary operation tuple, indicating an ack multiplicity/multiset bug or a hub that silently dropped the op. Guard at workers/sync-hub/canary/canary.ts:247 detects the protocol violation even though the HTTP status looked successful.

Common situations: See trigger scenarios.


AI-assisted analysis of thedotmack/claude-mem@d768ba3643 (2026-08-12). Data as JSON: /api/errors/453eec4f060b6b00. Report an issue: GitHub.