{"record":{"id":"4a93f7b0f3b284da","repo":"helix-editor/helix","slug":"current-working-directory-does-not-exist-4a93f7","errorCode":null,"errorMessage":"Current working directory does not exist","messagePattern":"Current working directory does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"helix-term/src/commands/syntax.rs","lineNumber":330,"sourceCode":"            Ok(pattern) => pattern,\n            Err(err) => return async { Err(anyhow::anyhow!(err)) }.boxed(),\n        };\n        let loader = editor.syn_loader.load();\n        for doc in editor.documents() {\n            let Some(syntax) = doc.syntax() else { continue };\n            let text = doc.text().slice(..);\n            let uri_or_id = doc\n                .uri()\n                .map(UriOrDocumentId::Uri)\n                .unwrap_or_else(|| UriOrDocumentId::Id(doc.id()));\n            for tag in tags_iter(syntax, &loader, text.slice(..), uri_or_id, Some(&pattern)) {\n                if injector.push(tag).is_err() {\n                    return async { Ok(()) }.boxed();\n                }\n            }\n        }\n        if !state.search_root.exists() {\n            return async { Err(anyhow::anyhow!(\"Current working directory does not exist\")) }\n                .boxed();\n        }\n        let matcher = match state.regex_matcher_builder.build(query) {\n            Ok(matcher) => {\n                // Clear any \"Failed to compile regex\" errors out of the statusline.\n                editor.clear_status();\n                matcher\n            }\n            Err(err) => {\n                log::info!(\n                    \"Failed to compile search pattern in workspace symbol search: {}\",\n                    err\n                );\n                return async { Err(anyhow::anyhow!(\"Failed to compile regex\")) }.boxed();\n            }\n        };\n        let pattern = Arc::new(pattern);\n        let injector = injector.clone();","sourceCodeStart":312,"sourceCodeEnd":348,"githubUrl":"https://github.com/helix-editor/helix/blob/079a789e8cb08ead67f19e1971a1b7438b37354b/helix-term/src/commands/syntax.rs#L312-L348","documentation":"The syntax-based workspace symbol picker (syntax_workspace_symbol_picker in commands/syntax.rs, the workspace-wide variant under the pickers menu) searches open documents first, then uses helix_stdx::env::current_working_dir() — helix's cached CWD — as the root for workspace-wide scanning. Like :global-search it checks root.exists() and errors immediately if the directory was deleted, renamed, or unmounted while helix runs.","triggerScenarios":"Open the workspace symbol picker after the directory helix started in (or last :cd'ed to) was removed by another terminal, a tmp cleaner, or a container volume unmount.","commonSituations":"Deleted git worktrees; /tmp and scratch dirs cleaned mid-session; deploy pipelines removing old release directories under a long-running editor.","solutions":["Run `:cd <existing-dir>` to update the cached working directory, then reopen the picker.","Restart helix from a directory that still exists.","Recreate the missing directory (mkdir -p) if the path is supposed to exist."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let root = helix_stdx::env::current_working_dir();\nif !root.exists() {\n    // `:cd` somewhere valid before opening the workspace symbol picker\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Avoid sessions rooted in directories other processes may delete (worktrees, /tmp).","After external deletions, run `:cd` to refresh helix's cached CWD before workspace scans."],"tags":["filesystem","cwd","symbol-search"],"backgroundTag":null,"analyzedSha":"079a789e8cb08ead67f19e1971a1b7438b37354b","analyzedAt":"2026-08-16T09:09:59.668Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}