{"record":{"id":"074e0481bc3e7d1b","repo":"openai/codex","slug":"approval-policy-untrusted-is-no-longer-support","errorCode":null,"errorMessage":"approval_policy = \"untrusted\" is no longer supported; remove this setting","messagePattern":"approval_policy = \"untrusted\" is no longer supported; remove this setting","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"codex-rs/app-server/src/config_manager_service.rs","lineNumber":741,"sourceCode":"            for item in items {\n                array.push(toml_value_to_value(item)?);\n            }\n            Ok(toml_edit::Value::Array(array))\n        }\n        TomlValue::Table(table) => {\n            let mut inline = toml_edit::InlineTable::new();\n            for (key, val) in table {\n                inline.insert(key, toml_value_to_value(val)?);\n            }\n            Ok(toml_edit::Value::InlineTable(inline))\n        }\n    }\n}\n\nfn validate_config(value: &TomlValue) -> anyhow::Result<()> {\n    let config: ConfigToml = value.clone().try_into()?;\n    if config.approval_policy == Some(AskForApproval::UnlessTrusted) {\n        anyhow::bail!(\n            \"approval_policy = \\\"untrusted\\\" is no longer supported; remove this setting\"\n        );\n    }\n    Ok(())\n}\n\nfn paths_match(expected: impl AsRef<Path>, provided: impl AsRef<Path>) -> bool {\n    path_utils::paths_match_after_normalization(expected, provided)\n}\n\nfn value_at_path<'a>(root: &'a TomlValue, segments: &[String]) -> Option<&'a TomlValue> {\n    let mut current = root;\n    for segment in segments {\n        match current {\n            TomlValue::Table(table) => {\n                current = table.get(segment)?;\n            }\n            TomlValue::Array(items) => {","sourceCodeStart":723,"sourceCodeEnd":759,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server/src/config_manager_service.rs#L723-L759","documentation":"Part of post-consolidation validation: tokio::fs::metadata follows links, so the ensure! fires when MEMORY.md exists but is not a regular file — typically a directory or a symlink to one (codex-rs/memories/write/src/workspace.rs:65). The validator refuses to bless a tree whose primary memory artifact has the wrong file type; the read itself is wrapped with a 'read consolidated memory artifact' context.","triggerScenarios":"After consolidation, root/MEMORY.md is a directory, a symlink to a directory, or another non-file entry (fifo, mount point).","commonSituations":"MEMORY.md replaced by a folder by sync/merge tools; symlinked from a dotfiles repo; partial merges leaving a directory where the file belongs.","solutions":["Inspect the entry (ls -l <root>/MEMORY.md) and remove the offending directory or link.","Re-run consolidation so MEMORY.md is regenerated as a regular file.","Exclude the memories root from tools that convert files into directories or links."],"exampleFix":"# before\n~/.codex/memories/MEMORY.md/   # accidentally a directory\n# after\nrm -r ~/.codex/memories/MEMORY.md && codex memories consolidate","handlingStrategy":"validation","validationCode":"async fn memory_md_is_file(root: &std::path::Path) -> bool {\n    tokio::fs::metadata(root.join(\"MEMORY.md\"))\n        .await\n        .map(|m| m.is_file())\n        .unwrap_or(false)\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = validate_consolidation_artifacts(root).await {\n    if e.to_string().contains(\"is not a file\") {\n        // remove the offending directory/symlink at MEMORY.md and re-run\n        // consolidation so the artifact is regenerated\n    }\n}","preventionTips":["Check that MEMORY.md is a regular file after any sync or merge operation.","Exclude the memories root from tools that convert files to directories or links.","Re-run consolidation after cleaning instead of hand-crafting the artifact."],"tags":["memories","consolidation","filesystem","validation","rust"],"backgroundTag":"consolidation-validation-failed","analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}