{"record":{"id":"47b95ab02afcd361","repo":"bytedance/deer-flow","slug":"failed-to-inspect-checkpoint-history-47b95a","errorCode":null,"errorMessage":"Failed to inspect checkpoint history","messagePattern":"Failed to inspect checkpoint history","errorType":"http","errorClass":"HTTPException","httpStatus":500,"severity":"error","filePath":"backend/app/gateway/routers/threads.py","lineNumber":281,"sourceCode":"        )\n    except CheckpointLineageError as exc:\n        thread_id = config.get(\"configurable\", {}).get(\"thread_id\", \"\")\n        logger.warning(\n            \"Rejected unsafe checkpoint lineage for branch thread %s\",\n            sanitize_log_param(thread_id),\n            exc_info=True,\n        )\n        raise HTTPException(status_code=409, detail=\"This turn can no longer be branched from.\") from exc\n\n    try:\n        history = await accessor.ahistory(config, limit=_BRANCH_HISTORY_RAW_SCAN_LIMIT)\n    except _CHECKPOINT_MODE_ERRORS as exc:\n        thread_id = config.get(\"configurable\", {}).get(\"thread_id\", \"\")\n        raise _checkpoint_mode_http_error(exc, thread_id) from exc\n    except Exception as exc:\n        thread_id = config.get(\"configurable\", {}).get(\"thread_id\", \"\")\n        logger.exception(\"Failed to scan replay checkpoint history for thread %s\", sanitize_log_param(thread_id))\n        raise HTTPException(status_code=500, detail=\"Failed to inspect checkpoint history\") from exc\n\n    replay_base, target_found = find_checkpoint_before_message_chronologically(history, target_human_id)\n    if not target_found:\n        logger.warning(\n            \"Could not locate branch user message %s in chronological history for thread %s\",\n            sanitize_log_param(target_human_id),\n            sanitize_log_param(config.get(\"configurable\", {}).get(\"thread_id\", \"\")),\n        )\n    return replay_base\n\n\ndef _ignore_branch_user_data(directory: str, names: list[str]) -> set[str]:\n    ignored: set[str] = set()\n    base = Path(directory)\n    for name in names:\n        path = base / name\n        if name.startswith(\".upload-\") and name.endswith(\".part\"):\n            ignored.add(name)","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/bytedance/deer-flow/blob/1dd6ba1acb03700589994b0366c5d1c7d05e2eff/backend/app/gateway/routers/threads.py#L263-L299","documentation":"Error \"Failed to inspect checkpoint history\" thrown in bytedance/deer-flow.","triggerScenarios":"Thrown at backend/app/gateway/routers/threads.py:281 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check checkpoint storage health (database backend connectivity) and retry.","See Gateway logs for the underlying checkpoint store error."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1dd6ba1acb03700589994b0366c5d1c7d05e2eff","analyzedAt":"2026-08-14T21:20:34.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}