{"record":{"id":"3d8065f36559ae66","repo":"chroma-core/chroma","slug":"collection-forking-is-not-implemented-for-local-ch","errorCode":null,"errorMessage":"Collection forking is not implemented for Local Chroma","messagePattern":"Collection forking is not implemented for Local Chroma","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"chromadb/api/rust.py","lineNumber":362,"sourceCode":"        if new_configuration:\n            new_configuration_json_str = update_collection_configuration_to_json_str(\n                new_configuration\n            )\n        else:\n            new_configuration_json_str = None\n        self.bindings.update_collection(\n            str(id), new_name, new_metadata, new_configuration_json_str\n        )\n\n    @override\n    def _fork(\n        self,\n        collection_id: UUID,\n        new_name: str,\n        tenant: str = DEFAULT_TENANT,\n        database: str = DEFAULT_DATABASE,\n    ) -> CollectionModel:\n        raise NotImplementedError(\n            \"Collection forking is not implemented for Local Chroma\"\n        )\n\n    @override\n    def _fork_count(\n        self,\n        collection_id: UUID,\n        tenant: str = DEFAULT_TENANT,\n        database: str = DEFAULT_DATABASE,\n    ) -> int:\n        raise NotImplementedError(\"Fork count is not implemented for Local Chroma\")\n\n    @override\n    def _get_indexing_status(\n        self,\n        collection_id: UUID,\n        tenant: str = DEFAULT_TENANT,\n        database: str = DEFAULT_DATABASE,","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/api/rust.py#L344-L380","documentation":"RustBindingsAPI._fork (chromadb/api/rust.py:362) is an intentional stub. Collection forking (Collection.fork(new_name)) is implemented only by the Chroma server; the embedded Rust bindings backend (chromadb.RustClient or Settings(chroma_api_impl='chromadb.api.rust.RustBindingsAPI')) has no forking implementation, so every fork() call in that mode raises NotImplementedError.","triggerScenarios":"client = chromadb.RustClient(path='./data'); client.get_collection('docs').fork('docs-v2'). Any sync Collection.fork or async AsyncCollection.fork call whose client routes to the Rust bindings API implementation.","commonSituations":"Writing forking code against a Chroma server then running the same script locally with the embedded Rust client; switching chroma_api_impl to the Rust implementation for speed; CI suites that use embedded clients to test server-only features.","solutions":["Connect with chromadb.HttpClient(host=..., port=...) to a running Chroma server (started via `chroma run`) - the server implements _fork","If you must stay embedded, emulate a fork: create a new collection and copy records with get() + add()","Feature-detect the backend before calling fork() and branch (skip, warn, or copy) when running embedded"],"exampleFix":"# before (embedded Rust client - raises NotImplementedError)\nclient = chromadb.RustClient(path='./data')\nclone = client.get_collection('docs').fork('docs-copy')\n\n# after (server client - supported)\nclient = chromadb.HttpClient(host='localhost', port=8000)\nclone = client.get_collection('docs').fork('docs-copy')","handlingStrategy":"fallback","validationCode":"def is_server_client(client) -> bool:\n    \"\"\"True when the client talks to a Chroma server (supports fork).\"\"\"\n    return type(client._server).__module__.startswith('chromadb.api.fastapi')","typeGuard":null,"tryCatchPattern":"try:\n    clone = collection.fork('docs-copy')\nexcept NotImplementedError:\n    # embedded Rust backend: fall back to manual copy\n    clone = client.create_collection('docs-copy')\n    batch = collection.get(include=['embeddings', 'documents', 'metadatas'])\n    clone.add(ids=batch['ids'], embeddings=batch['embeddings'],\n              documents=batch['documents'], metadatas=batch['metadatas'])","preventionTips":["Decide deployment mode up front: any fork usage requires HttpClient against a running `chroma run` server","Wrap server-only features behind a thin capability layer that checks the backend once at startup","Keep embedded test suites limited to the API surface the embedded backend implements"],"tags":["chroma","embedded-mode","rust-bindings","fork","not-implemented"],"backgroundTag":"feature-unsupported-in-embedded-mode","analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}