{"record":{"id":"7f8fa71114965491","repo":"openai/codex","slug":"profile-only-applies-to-runtime-commands-and-co","errorCode":null,"errorMessage":"--profile only applies to runtime commands and `codex mcp`: `codex`, `codex exec`, `codex review`, `codex resume`, `codex queue`, `codex archive`, `codex delete`, `codex unarchive`, `codex fork`, `codex mcp`, `codex sandbox`, and `codex debug prompt-input`.","messagePattern":"--profile only applies to runtime commands and `codex mcp`: `codex`, `codex exec`, `codex review`, `codex resume`, `codex queue`, `codex archive`, `codex delete`, `codex unarchive`, `codex fork`, `codex mcp`, `codex sandbox`, and `codex debug prompt-input`\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/cli/src/main.rs","lineNumber":1849,"sourceCode":"        return Ok(None);\n    };\n\n    match subcommand {\n        Subcommand::Agents(_)\n        | Subcommand::Exec(_)\n        | Subcommand::Review(_)\n        | Subcommand::Resume(_)\n        | Subcommand::Queue(_)\n        | Subcommand::Archive(_)\n        | Subcommand::Delete(_)\n        | Subcommand::Unarchive(_)\n        | Subcommand::Fork(_)\n        | Subcommand::Mcp(_)\n        | Subcommand::Sandbox(_)\n        | Subcommand::Debug(DebugCommand {\n            subcommand: DebugSubcommand::PromptInput(_),\n        }) => Ok(Some(profile_v2)),\n        _ => anyhow::bail!(\n            \"--profile only applies to runtime commands and `codex mcp`: `codex`, `codex exec`, `codex review`, `codex resume`, `codex queue`, `codex archive`, `codex delete`, `codex unarchive`, `codex fork`, `codex mcp`, `codex sandbox`, and `codex debug prompt-input`.\"\n        ),\n    }\n}\n\nasync fn run_exec_server_command(\n    cmd: ExecServerCommand,\n    arg0_paths: &Arg0DispatchPaths,\n    root_config_overrides: &CliConfigOverrides,\n    strict_config: bool,\n) -> anyhow::Result<()> {\n    let codex_self_exe = arg0_paths\n        .codex_self_exe\n        .clone()\n        .ok_or_else(|| anyhow::anyhow!(\"Codex executable path is not configured\"))?;\n    let runtime_paths = codex_exec_server::ExecServerRuntimePaths::new(\n        codex_self_exe,\n        arg0_paths.codex_linux_sandbox_exe.clone(),","sourceCodeStart":1831,"sourceCodeEnd":1867,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/cli/src/main.rs#L1831-L1867","documentation":"Error \"--profile only applies to runtime commands and `codex mcp`: `codex`, `codex exec`, `codex review`, `codex resume`, `codex queue`, `codex archive`, `codex delete`, `codex unarchive`, `codex fork`, `codex mcp`, `codex sandbox`, and `codex debug prompt-input`.\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/cli/src/main.rs:1849 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}