openai/codex · error · anyhow::Error

Specify --uncommitted, --base, --commit, or provide custom r

Error message

Specify --uncommitted, --base, --commit, or provide custom review instructions

What it means

Error "Specify --uncommitted, --base, --commit, or provide custom review instructions" thrown in openai/codex.

Source

Thrown at codex-rs/exec/src/lib.rs:2142

    let target = if args.uncommitted {
        ReviewTarget::UncommittedChanges
    } else if let Some(branch) = args.base.clone() {
        ReviewTarget::BaseBranch { branch }
    } else if let Some(sha) = args.commit.clone() {
        ReviewTarget::Commit {
            sha,
            title: args.commit_title.clone(),
        }
    } else if let Some(prompt_arg) = args.prompt.clone() {
        let prompt = resolve_prompt(Some(prompt_arg)).trim().to_string();
        if prompt.is_empty() {
            anyhow::bail!("Review prompt cannot be empty");
        }
        ReviewTarget::Custom {
            instructions: prompt,
        }
    } else {
        anyhow::bail!(
            "Specify --uncommitted, --base, --commit, or provide custom review instructions"
        );
    };

    Ok(ReviewRequest {
        target,
        user_facing_hint: None,
    })
}

#[cfg(test)]
#[path = "lib_tests.rs"]
mod tests;

View on GitHub (pinned to 339751715c)

Solutions

  1. Pass --uncommitted, --base, --commit, or custom review instructions.

When it happens

Trigger: Thrown at codex-rs/exec/src/lib.rs:2142 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/0ee4c00a9794cb85. Report an issue: GitHub.