{"record":{"id":"e0d792c99c9f6208","repo":"langchain-ai/langgraph","slug":"retry-is-deprecated-and-will-be-removed-please","errorCode":null,"errorMessage":"`retry` is deprecated and will be removed. Please use `retry_policy` instead.","messagePattern":"`retry` is deprecated and will be removed\\. Please use `retry_policy` instead\\.","errorType":"console","errorClass":"LangGraphDeprecatedSinceV05","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/func/__init__.py","lineNumber":217,"sourceCode":"\n\n        @task\n        async def add_one_task(a: int) -> int:\n            return a + 1\n\n\n        @entrypoint()\n        async def add_one(numbers: list[int]) -> list[int]:\n            futures = [add_one_task(n) for n in numbers]\n            return asyncio.gather(*futures)\n\n\n        # Call the entrypoint\n        await add_one.ainvoke([1, 2, 3])  # Returns [2, 3, 4]\n        ```\n    \"\"\"\n    if (retry := kwargs.get(\"retry\", MISSING)) is not MISSING:\n        warnings.warn(\n            \"`retry` is deprecated and will be removed. Please use `retry_policy` instead.\",\n            category=LangGraphDeprecatedSinceV05,\n            stacklevel=2,\n        )\n        if retry_policy is None:\n            retry_policy = retry  # type: ignore[assignment]\n    timeout_policy = coerce_timeout_policy(timeout)\n\n    retry_policies: Sequence[RetryPolicy] = (\n        ()\n        if retry_policy is None\n        else (retry_policy,)\n        if isinstance(retry_policy, RetryPolicy)\n        else retry_policy\n    )\n\n    def decorator(\n        func: Callable[P, Awaitable[T]] | Callable[P, T],","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/func/__init__.py#L199-L235","documentation":"Error \"`retry` is deprecated and will be removed. Please use `retry_policy` instead.\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/func/__init__.py:217 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}