{"record":{"id":"8946cea0810a2f98","repo":"zed-industries/zed","slug":"toolchain-store-to-be-local","errorCode":null,"errorMessage":"Toolchain store to be local","messagePattern":"Toolchain store to be local","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/remote_server/src/headless_project.rs","lineNumber":223,"sourceCode":"                fs.clone(),\n                worktree_store.clone(),\n                task_store.clone(),\n                true,\n                cx,\n            );\n            observer.shared(REMOTE_SERVER_PROJECT_ID, session.clone(), cx);\n            observer\n        });\n\n        let lsp_store = cx.new(|cx| {\n            let mut lsp_store = LspStore::new_local(\n                buffer_store.clone(),\n                worktree_store.clone(),\n                prettier_store.clone(),\n                toolchain_store\n                    .read(cx)\n                    .as_local_store()\n                    .expect(\"Toolchain store to be local\")\n                    .clone(),\n                environment.clone(),\n                manifest_tree,\n                languages.clone(),\n                http_client.clone(),\n                fs.clone(),\n                cx,\n            );\n            lsp_store.shared(REMOTE_SERVER_PROJECT_ID, session.clone(), cx);\n            lsp_store\n        });\n\n        AgentRegistryStore::init_global(cx, fs.clone(), http_client.clone());\n\n        let agent_server_store = cx.new(|cx| {\n            let mut agent_server_store = AgentServerStore::local(\n                node_runtime.clone(),\n                fs.clone(),","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/zed-industries/zed/blob/9d272b036335401f339d024ea94968fd51016c40/crates/remote_server/src/headless_project.rs#L205-L241","documentation":"Headless remote server project setup asserts the toolchain store is in local mode (as_local_store) before use. It is not, meaning the store was created for a different (remote/embedded) context than the headless server requires — an invariant violation in project assembly.","triggerScenarios":"Thrown at crates/remote_server/src/headless_project.rs:221 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the toolchain store with the local variant on the remote server","Check how toolchain_store is constructed upstream in new()","Make as_local_store return a Result and handle the mismatch gracefully"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9d272b036335401f339d024ea94968fd51016c40","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}