{"record":{"id":"8de770fa661308dc","repo":"langchain-ai/deepagents","slug":"agent-backend-did-not-publish-its-offload-operatio","errorCode":null,"errorMessage":"Agent backend did not publish its offload operation; /offload has no server implementation.","messagePattern":"Agent backend did not publish its offload operation; /offload has no server implementation\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"libs/code/deepagents_code/server_graph.py","lineNumber":422,"sourceCode":"            cwd=project_context.user_cwd if project_context is not None else config.cwd,\n            project_context=project_context,\n            async_subagents=async_subagents,\n            goal_criteria_tools=read_only_context_tools,\n            rubric_grader_tools=read_only_context_tools,\n            model_retries=result.model_retries,\n            cli_max_retries=result.cli_max_retries,\n            summarization_model=config.summarization_model,\n            extension_registry=extension_registry,\n        )\n        from deepagents_code.offload_middleware import offload_operation_from\n\n        offload = offload_operation_from(composite_backend)\n        if offload is None:\n            msg = (\n                \"Agent backend did not publish its offload operation; \"\n                \"/offload has no server implementation.\"\n            )\n            raise RuntimeError(msg)\n        return ServerRuntime(\n            agent=agent,\n            backend=composite_backend,\n            offload=offload,\n        )\n\n    from deepagents_code._env_vars import EXPERIMENTAL, is_env_truthy\n\n    if is_env_truthy(EXPERIMENTAL):\n        from deepagents_code.extensions import ExtensionMode, load_extensions\n        from deepagents_code.extensions.runtime import bind_server_extensions\n\n        extension_result = await load_extensions(\n            cwd=(\n                project_context.user_cwd\n                if project_context is not None\n                else Path(config.cwd)\n                if config.cwd is not None","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/server_graph.py#L404-L440","documentation":"RuntimeError raised while building the CLI server graphs when the composite agent backend does not expose an offload operation. /offload is a built-in command that needs a server-side implementation; if the backend never published one, the runtime cannot be constructed and startup fails fast.","triggerScenarios":"Calling _create_cli_graphs_sync (indirectly at startup/runtime construction) with a backend assembled such that offload_operation_from(composite_backend) returns None — e.g. a custom or partial backend missing the offload capability.","commonSituations":"Swapping in a custom backend for testing that omits the offload operation; mis-ordered backend composition where the offload-publishing layer is missing; version drift between the CLI and backend packages.","solutions":["Use a backend factory/builder that includes the offload operation layer","Check the backend composition code for a missing layer that publishes the offload operation","Pin/upgrade backend packages so CLI and backend capabilities match","If only testing graphs, provide a stub backend that registers a no-op offload operation"],"exampleFix":"// before\nbackend = create_backend(model)  # no offload layer\n\n// after\nbackend = create_backend(model, include_offload=True)  # publishes offload op","handlingStrategy":"type-guard","validationCode":"from deepagents_code.server_graph import offload_operation_from\nif offload_operation_from(backend) is None:\n    raise RuntimeError(\"backend lacks offload op; fix backend composition before building graphs\")","typeGuard":"def has_offload(backend: object) -> bool:\n    return offload_operation_from(backend) is not None","tryCatchPattern":"try:\n    runtime = build_cli_graphs(backend)\nexcept RuntimeError as e:\n    if \"offload\" in str(e):\n        runtime = build_cli_graphs(with_offload_layer(backend))\n    else:\n        raise","preventionTips":["Build backends via the provided factory so the offload layer is always included","Unit-test custom backends for offload_operation_from(backend) is not None","Keep CLI and backend package versions in sync","Re-check composition after refactoring backend layers"],"tags":["runtime","backend","startup","offload"],"backgroundTag":"missing-capability-on-backend","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}