openai/codex · error · anyhow::Error

consolidated memory artifact is not a file: {}

Error message

consolidated memory artifact is not a file: {}

What it means

Error "consolidated memory artifact is not a file: {}" thrown in openai/codex.

Source

Thrown at codex-rs/memories/write/src/workspace.rs:65

    reset_git_repository(root).await
}

/// Verifies that a completed consolidation run left the required memory artifacts in place.
pub async fn validate_consolidation_artifacts(root: &Path) -> anyhow::Result<()> {
    let removed_symlinks = remove_memory_symlinks(root).await?;
    anyhow::ensure!(
        removed_symlinks == 0,
        "removed {removed_symlinks} symbolic links from consolidated memory workspace"
    );

    let memory_path = root.join("MEMORY.md");
    let memory_metadata = tokio::fs::metadata(&memory_path).await.with_context(|| {
        format!(
            "read consolidated memory artifact {}",
            memory_path.display()
        )
    })?;
    anyhow::ensure!(
        memory_metadata.is_file(),
        "consolidated memory artifact is not a file: {}",
        memory_path.display()
    );

    let summary_path = root.join("memory_summary.md");
    let summary = tokio::fs::read_to_string(&summary_path)
        .await
        .with_context(|| format!("read memory summary artifact {}", summary_path.display()))?;
    anyhow::ensure!(
        summary.lines().next() == Some("v1"),
        "memory summary artifact does not start with v1: {}",
        summary_path.display()
    );

    Ok(())
}

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/memories/write/src/workspace.rs:65 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/c1b6672825afdcb5. Report an issue: GitHub.