openclaw/openclaw · error · Error

Codex restricted-tool-surface MCP attestation found…

Error message

Codex restricted-tool-surface MCP attestation found unexpected server ${status.name}

What it means

Attestation found a status row for a server not in the expected-disabled set — a server outside the explicit deny patch is present, so the restricted surface's invariant (only explicitly denied servers) is violated.

Solutions

  1. Add an enabled:false deny patch for the unexpected server
  2. Remove the server from the inherited Codex config
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at extensions/codex/src/app-server/thread-requests.ts:596 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openclaw/openclaw@01804a7531 (2026-08-12). Data as JSON: /api/errors/c1456c15b39433ef. Report an issue: GitHub.

Appendix: source

Thrown at extensions/codex/src/app-server/thread-requests.ts:596

  const response = await client.request(
    "mcpServerStatus/list",
    { threadId, detail: "toolsAndAuthOnly" },
    { signal },
  );
  if (!isJsonObject(response) || !Array.isArray(response.data)) {
    throw new Error(
      "Codex mcpServerStatus/list returned an invalid restricted-tool-surface attestation",
    );
  }
  const observedDisabledServerNames = new Set<string>();
  for (const status of response.data) {
    if (!isJsonObject(status) || typeof status.name !== "string" || !isJsonObject(status.tools)) {
      throw new Error(
        "Codex mcpServerStatus/list returned an invalid restricted-tool-surface server",
      );
    }
    if (!expectedDisabledServerNames.has(status.name)) {
      throw new Error(
        `Codex restricted-tool-surface MCP attestation found unexpected server ${status.name}`,
      );
    }
    if (observedDisabledServerNames.has(status.name)) {
      throw new Error(
        `Codex restricted-tool-surface MCP attestation returned duplicate server ${status.name}`,
      );
    }
    observedDisabledServerNames.add(status.name);
    if (!Object.hasOwn(status, "serverInfo")) {
      throw new Error(
        `Codex restricted-tool-surface MCP attestation returned malformed server ${status.name}`,
      );
    }
    if (status.serverInfo !== null) {
      throw new Error(
        `Codex restricted-tool-surface MCP attestation found active server ${status.name}`,
      );

View on GitHub (pinned to 01804a7531)