{"record":{"id":"ba9d3aa403228587","repo":"openclaw/openclaw","slug":"unknown-codex-session-catalog-parameter-unknown","errorCode":null,"errorMessage":"unknown Codex session catalog parameter: ${unknown}","messagePattern":"unknown Codex session catalog parameter: (.+?)","errorType":"validation","errorClass":"CatalogParamsError","httpStatus":null,"severity":"error","filePath":"extensions/codex/src/session-catalog-parsing.ts","lineNumber":210,"sourceCode":"    throw new CatalogParamsError(`${key} must be a string`);\n  }\n  const trimmed = value.trim();\n  if (!trimmed) {\n    return undefined;\n  }\n  if (trimmed.length > maxLength) {\n    throw new CatalogParamsError(`${key} must be at most ${maxLength} characters`);\n  }\n  return trimmed;\n}\n\nexport function requireOnlyKeys(\n  params: Record<string, unknown>,\n  allowed: ReadonlySet<string>,\n): void {\n  const unknown = Object.keys(params).find((key) => !allowed.has(key));\n  if (unknown) {\n    throw new CatalogParamsError(`unknown Codex session catalog parameter: ${unknown}`);\n  }\n}\n\nexport function readPageParams(value: unknown): CodexSessionCatalogPageParams {\n  if (!isRecord(value)) {\n    throw new CatalogParamsError(\"Codex session catalog parameters must be an object\");\n  }\n  const params = value;\n  requireOnlyKeys(params, new Set([\"cursor\", \"limit\", \"searchTerm\", \"cwd\"]));\n  const cursor = readBoundedOptionalString(params, \"cursor\", MAX_CURSOR_LENGTH);\n  const searchTerm = readBoundedOptionalString(params, \"searchTerm\", MAX_SEARCH_LENGTH);\n  const cwd = readBoundedOptionalString(params, \"cwd\", MAX_CWD_LENGTH);\n  return {\n    limit: normalizeLimit(params.limit, \"limit\"),\n    ...(cursor ? { cursor } : {}),\n    ...(searchTerm ? { searchTerm } : {}),\n    ...(cwd ? { cwd } : {}),\n  };","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/extensions/codex/src/session-catalog-parsing.ts#L192-L228","documentation":"Thrown as CatalogParamsError by requireOnlyKeys in session-catalog-parsing.ts:210 when the params object contains any key not in the allowed set. readPageParams allows {cursor, limit, searchTerm, cwd}; readGatewayParams allows {search, limitPerHost, hostIds, cursors}. The offending key name is included in the message.","triggerScenarios":"Passing a typo'd key (e.g. 'limt' instead of 'limit'), an extra unsupported field, or params shaped for the wrong reader (gateway params passed to readPageParams or vice versa).","commonSituations":"Client copies params from one endpoint to another without filtering; SDK version added a new allowed key the caller's build does not recognise (reverse case); UI forwards a debug field.","solutions":["Send only the keys listed in the allowed set for the reader you are targeting.","Remove typo'd or debug fields before constructing the params object.","Confirm you are calling readPageParams for page-level params and readGatewayParams for gateway-level params.","After upgrading OpenClaw, check the changelog for newly allowed keys if you want to use them."],"exampleFix":"// before\nreadPageParams({ cursor, limit, limt: 5 }); // throws: unknown key 'limt'\n\n// after\nreadPageParams({ cursor, limit });","handlingStrategy":"validation","validationCode":"// Allow-list keys before forwarding to readPageParams / readGatewayParams.\nconst PAGE_ALLOWED = new Set(['cursor', 'limit', 'searchTerm', 'cwd']);\nconst filtered = Object.fromEntries(\n  Object.entries(raw).filter(([k]) => PAGE_ALLOWED.has(k)),\n);\nreadPageParams(filtered);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Send only the keys in the allowed set for the reader you target (page vs gateway).","Strip debug or typo'd fields before constructing params.","Do not forward one endpoint's params to another without filtering.","After upgrades, check the changelog for newly allowed keys."],"tags":["codex","session-catalog","validation","unknown-key","params"],"backgroundTag":null,"analyzedSha":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}