{"record":{"id":"f75bbaeb675c2219","repo":"bytedance/deer-flow","slug":"checkpoint-must-be-an-object","errorCode":null,"errorMessage":"checkpoint must be an object","messagePattern":"checkpoint must be an object","errorType":"http","errorClass":"HTTPException","httpStatus":400,"severity":"warning","filePath":"backend/app/gateway/services.py","lineNumber":944,"sourceCode":"    )\n\n\nasync def apply_checkpoint_to_run_config(\n    config: dict[str, Any],\n    *,\n    body: Any,\n    thread_id: str,\n    request: Request,\n) -> None:\n    \"\"\"Validate an optional run checkpoint and attach it to RunnableConfig.\"\"\"\n    checkpoint = getattr(body, \"checkpoint\", None)\n    checkpoint_id = getattr(body, \"checkpoint_id\", None)\n    checkpoint_ns = \"\"\n    checkpoint_map = None\n\n    if checkpoint:\n        if not isinstance(checkpoint, Mapping):\n            raise HTTPException(status_code=400, detail=\"checkpoint must be an object\")\n        checkpoint_thread_id = checkpoint.get(\"thread_id\")\n        if checkpoint_thread_id is not None and str(checkpoint_thread_id) != thread_id:\n            raise HTTPException(status_code=400, detail=\"checkpoint thread_id does not match request thread_id\")\n        raw_checkpoint_id = checkpoint.get(\"checkpoint_id\")\n        if raw_checkpoint_id:\n            checkpoint_id = str(raw_checkpoint_id)\n        raw_checkpoint_ns = checkpoint.get(\"checkpoint_ns\")\n        if raw_checkpoint_ns is not None:\n            checkpoint_ns = str(raw_checkpoint_ns)\n        checkpoint_map = checkpoint.get(\"checkpoint_map\")\n\n    if not checkpoint_id:\n        return\n\n    read_config: dict[str, Any] = {\n        \"configurable\": {\n            \"thread_id\": thread_id,\n            \"checkpoint_ns\": checkpoint_ns,","sourceCodeStart":926,"sourceCodeEnd":962,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/gateway/services.py#L926-L962","documentation":"HTTP 400 raised when a run payload includes a `checkpoint` object that is not a JSON object/Mapping (e.g. a string, list, or number). The checkpoint field lets clients point a run at a prior checkpoint; its shape is validated before any checkpoint ids are extracted.","triggerScenarios":"POSTing a run with \"checkpoint\": \"<checkpoint-id-string>\" instead of {\"checkpoint_id\": ...}, or checkpoint: [...] / checkpoint: 123.","commonSituations":"Clients assuming checkpoint is a plain id string (a common API design); passing the stringified JSON of a checkpoint; copy-paste from a different tool's API.","solutions":["Send checkpoint as an object: {\"checkpoint_id\": \"...\", \"thread_id\": \"...\"} (or omit it and use the top-level checkpoint_id field).","If you only have an id, use the top-level checkpoint_id field rather than the checkpoint object."],"exampleFix":"# before\n{\"checkpoint\": \"1ef4f797-8335-6428-8001-8a1506f3b775\", \"input\": {...}}\n\n# after\n{\"checkpoint_id\": \"1ef4f797-8335-6428-8001-8a1506f3b775\", \"input\": {...}}","handlingStrategy":"type-guard","validationCode":"if ('checkpoint' in payload && (typeof payload.checkpoint !== 'object' || payload.checkpoint === null || Array.isArray(payload.checkpoint))) {\n  throw new TypeError('checkpoint must be an object like {checkpoint_id: \"...\"}');\n}","typeGuard":"const isCheckpointObject = (c: unknown): c is Record<string, unknown> =>\n  typeof c === 'object' && c !== null && !Array.isArray(c);","tryCatchPattern":null,"preventionTips":["Model the run payload with a typed schema where checkpoint is an object or absent.","Use the flat checkpoint_id field when you only have an id."],"tags":["runs","http-400","checkpoints","validation"],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}