{"record":{"id":"0a14ce463844c062","repo":"openai/codex","slug":"path-path-was-not-found","errorCode":null,"errorMessage":"path '{path}' was not found","messagePattern":"path '(.+?)' was not found","errorType":"validation","errorClass":"MemoriesBackendError","httpStatus":null,"severity":"error","filePath":"codex-rs/ext/memories/src/backend.rs","lineNumber":147,"sourceCode":"    pub match_line_number: usize,\n    pub content_start_line_number: usize,\n    pub content: String,\n    pub matched_queries: Vec<String>,\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum MemoriesBackendError {\n    #[error(\"filename '{filename}' {reason}\")]\n    InvalidFilename { filename: String, reason: String },\n    #[error(\"ad-hoc note must not be empty\")]\n    EmptyAdHocNote,\n    #[error(\"ad-hoc note '{filename}' already exists\")]\n    AdHocNoteAlreadyExists { filename: String },\n    #[error(\"path '{path}' {reason}\")]\n    InvalidPath { path: String, reason: String },\n    #[error(\"cursor '{cursor}' {reason}\")]\n    InvalidCursor { cursor: String, reason: String },\n    #[error(\"path '{path}' was not found\")]\n    NotFound { path: String },\n    #[error(\"line_offset must be a 1-indexed line number\")]\n    InvalidLineOffset,\n    #[error(\"max_lines must be a positive integer\")]\n    InvalidMaxLines,\n    #[error(\"line_offset exceeds file length\")]\n    LineOffsetExceedsFileLength,\n    #[error(\"path '{path}' is not a file\")]\n    NotFile { path: String },\n    #[error(\"queries must not be empty or contain empty strings\")]\n    EmptyQuery,\n    #[error(\"all_within_lines.line_count must be a positive integer\")]\n    InvalidMatchWindow,\n    #[error(\"I/O error while reading memories: {0}\")]\n    Io(#[from] std::io::Error),\n}\n\nimpl MemoriesBackendError {","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/ext/memories/src/backend.rs#L129-L165","documentation":"A memory store path referenced by read (or a scoped list/search) does not exist. The backend resolves relative paths against its store root and nothing matched.","triggerScenarios":"read with a typo'd path, a file deleted between listing and reading, or a path rooted at the wrong base.","commonSituations":"Misspelled filenames; paths from a previous session's listing; store directory moved or rotated.","solutions":["List the parent path to see what actually exists.","Fix the path spelling or extension.","If the store moved, point the backend at the correct root."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Confirm existence via listing before reading a remembered path\nlet parent = parent_of(&path);\nlet listing = backend.list(ListMemoriesRequest { path: Some(parent), cursor: None, max_results: 1000 }).await?;\nif !listing.entries.iter().any(|e| e.path == path) {\n    return Err(MemoriesBackendError::NotFound { path }.into());\n}","typeGuard":null,"tryCatchPattern":"match backend.read(req).await {\n    Err(MemoriesBackendError::NotFound { path }) => {\n        // fall back to discovery instead of hard-failing the agent turn\n        suggest_similar_paths(&path)\n    }\n    r => r,\n}","preventionTips":["List the parent directory when unsure of exact names.","Re-list before reading paths remembered from earlier sessions — files move.","Check spelling and extension; store paths are exact matches."],"tags":["rust","memories","not-found","codex"],"backgroundTag":"file-not-found","analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}