{"record":{"id":"dacb27e06567e41d","repo":"langchain-ai/deepagents","slug":"workspace-binding-schema-is-unsupported-for-thread","errorCode":null,"errorMessage":"workspace binding schema is unsupported for thread {thread_id}","messagePattern":"workspace binding schema is unsupported for thread (.+?)","errorType":"exception","errorClass":"WorkspaceConflictError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/workspace.py","lineNumber":375,"sourceCode":"                msg = f\"thread {thread_id} has no workspace binding\"\n                raise WorkspaceConflictError(msg)\n            existing = _row_binding(row)\n            expected = existing.to_payload()\n            if any(data.get(key) != value for key, value in expected.items()):\n                msg = f\"workspace context does not match thread {thread_id}\"\n                raise WorkspaceConflictError(msg)\n            if (\n                claimed_fingerprint is not None\n                and claimed_fingerprint != existing.config_fingerprint\n            ):\n                msg = f\"workspace configuration does not match thread {thread_id}\"\n                raise WorkspaceConflictError(msg)\n            return existing\n\n    existing = await asyncio.to_thread(_require)\n    if existing.schema_version != _SCHEMA_VERSION:\n        msg = f\"workspace binding schema is unsupported for thread {thread_id}\"\n        raise WorkspaceConflictError(msg)\n    resolved = await asyncio.to_thread(\n        resolve_workspace,\n        existing.cwd,\n        existing.workspace_config(),\n        config_fingerprint=existing.config_fingerprint,\n    )\n    if resolved.workspace_id != existing.workspace_id:\n        msg = f\"workspace identity changed for thread {thread_id}\"\n        raise WorkspaceConflictError(msg)\n    return existing\n","sourceCodeStart":357,"sourceCodeEnd":386,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/workspace.py#L357-L386","documentation":"`require_thread_workspace` loads the persisted workspace binding for a thread and verifies its schema version matches the current `_SCHEMA_VERSION`. If the on-disk binding was written by an older/newer version of the library whose schema this build cannot read or migrate, it refuses with `WorkspaceConflictError` rather than operating on a binding it may misinterpret. This protects against silent corruption or wrong assumptions about the workspace layout.","triggerScenarios":"Calling `make_graph` or `_execute_offload` (which both call `require_thread_workspace`) for a thread whose stored binding row has `schema_version != _SCHEMA_VERSION` — typically after upgrading or downgrading the package between schema-incompatible releases, or hand-editing/copying the binding store.","commonSituations":"Upgrading `deepagents-code` across a schema bump without migrating; reverting to an older checkout while a newer binding exists; copying workspace state between machines running different versions; concurrent threads created by mixed library versions.","solutions":["Recreate the thread's workspace binding so it is written at the current schema version (delete/rebind the binding for that thread).","Align the library version with the one that wrote the binding (check the schema constant `_SCHEMA_VERSION` in the installed package vs. what wrote the store).","Run any provided migration path for the binding store, or clear the stale binding store and let threads rebind on next use."],"exampleFix":"// before: old binding row\n{\"thread_id\": \"t-1\", \"schema_version\": 1, ...}\n// after: rebind at current schema\nbinding = await create_thread_workspace(thread_id=\"t-1\", cwd=\"./ws\")\nawait require_thread_workspace(thread_id=\"t-1\")  # passes","handlingStrategy":"validation","validationCode":"from deepagents_code.workspace import require_thread_workspace, WorkspaceConflictError\ntry:\n    binding = await require_thread_workspace(thread_id)\nexcept WorkspaceConflictError as e:\n    if \"schema is unsupported\" in str(e):\n        recreate_binding(thread_id)  # rebind at current schema","typeGuard":null,"tryCatchPattern":"try:\n    await require_thread_workspace(thread_id)\nexcept WorkspaceConflictError as e:\n    if \"schema is unsupported\" in str(e):\n        rebind_thread_workspace(thread_id)\n    else:\n        raise","preventionTips":["Pin the library version per deployment so writers and readers share one schema.","After upgrading, run any migration or recreate bindings before serving threads.","Never hand-edit or copy binding stores between different library versions."],"tags":["workspace","schema-version","conflict","state"],"backgroundTag":"workspace-schema-version-mismatch","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}