vercel/ai · error · Error

${harnessId} ACP cold restoration completed without identify

Error message

${harnessId} ACP cold restoration completed without identifying the negotiated method.

What it means

restoreColdACPSession sends a start message over the bridge and waits for the restoration round-trip to settle with a negotiated restoration method ('resume' or 'load'). If the promise settles successfully but result.method is still null — i.e. the channel finished without ever recording which method was negotiated — this error is thrown, indicating an internal protocol invariant violation during cold restoration.

Source

Thrown at packages/harness-acp/src/v1/acp-v1-harness.ts:1023

        });
      }),
    );
    channel.onClose((_code, reason) => {
      settle({
        error: new Error(
          `${harnessId} ACP bridge closed during cold restoration: ${reason}`,
        ),
      });
    });
    try {
      channel.send(start);
    } catch (error) {
      settle({ error });
    }
  }).then(result => {
    if (result.error !== undefined) throw result.error;
    if (result.method == null) {
      throw new Error(
        `${harnessId} ACP cold restoration completed without identifying the negotiated method.`,
      );
    }
    return result.method;
  });
}

function createSession({
  sessionId,
  harnessId,
  channel,
  proc,
  modelMapping,
  defaultModelId,
  sessionMeta,
  instructionMapping,
  outputSchemaMapping,
  debug,

View on GitHub (pinned to 69428b1f8b)

Solutions

  1. Retry the cold restoration / restart the harness — this is often a transient handshake race.
  2. Verify the agent CLI version matches what @ai-sdk/harness-acp expects (upgrade the harness package or pin the agent version).
  3. Inspect bridge logs for the restoration message exchange to see whether the method response was sent.
  4. Ensure persisted cold-session state came from the same protocol version ('v1').
Defensive patterns

Strategy: retry

Try / catch

try {
  const method = await restoreColdACPSession(/* ... */);
} catch (error) {
  if (error instanceof Error && error.message.includes('cold restoration completed without identifying the negotiated method')) {
    // transient handshake issue: retry once, then fall back to a fresh session
    await restartHarness();
  } else {
    throw error;
  }
}

Prevention

When it happens

Trigger: Cold-restoring an ACP session where the bridge channel emits 'finish' before any restoration method (resume/load) was captured — e.g. the agent process completed the handshake in an unexpected order, or the response carrying the negotiated method was never routed to the settle callback.

Common situations: Agent CLI version mismatches that change the session-restore handshake; flaky bridge/IPC behavior where the method response is dropped; restoring state produced by a different protocol version; rare race conditions between finish and method capture.

Related errors


AI-assisted analysis of vercel/ai@69428b1f8b (2026-08-30). Data as JSON: /api/errors/93608e6680bc430e. Report an issue: GitHub.