{"record":{"id":"9747414b201cbfd4","repo":"openai/codex","slug":"schema-definition-collision-in-location-name","errorCode":null,"errorMessage":"schema definition collision in {location}: {name} (existing title: {existing_title}, new title: {new_title}); use #[schemars(rename = \"...\")] to rename one of the conflicting schema definitions","messagePattern":"schema definition collision in (.+?): (.+?) \\(existing title: (.+?), new title: (.+?)\\); use #\\[schemars\\(rename = \"\\.\\.\\.\"\\)\\] to rename one of the conflicting schema definitions","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/app-server-protocol/src/export.rs","lineNumber":1317,"sourceCode":"    definitions: &mut Map<String, Value>,\n    name: String,\n    schema: Value,\n    location: &str,\n) -> Result<()> {\n    if let Some(existing) = definitions.get(&name) {\n        if existing == &schema {\n            return Ok(());\n        }\n\n        let existing_title = existing\n            .get(\"title\")\n            .and_then(Value::as_str)\n            .unwrap_or(\"<untitled>\");\n        let new_title = schema\n            .get(\"title\")\n            .and_then(Value::as_str)\n            .unwrap_or(\"<untitled>\");\n        return Err(anyhow!(\n            \"schema definition collision in {location}: {name} (existing title: {existing_title}, new title: {new_title}); use #[schemars(rename = \\\"...\\\")] to rename one of the conflicting schema definitions\"\n        ));\n    }\n\n    definitions.insert(name, schema);\n    Ok(())\n}\n\nfn write_json_schema_with_return<T>(out_dir: &Path, name: &str) -> Result<GeneratedSchema>\nwhere\n    T: JsonSchema,\n{\n    let file_stem = name.trim();\n    let (raw_namespace, logical_name) = split_namespace(file_stem);\n    let include_in_json_codegen =\n        raw_namespace != Some(\"v1\") || JSON_V1_ALLOWLIST.contains(&logical_name);\n    let schema = schema_for!(T);\n    let mut schema_value = serde_json::to_value(schema)?;","sourceCodeStart":1299,"sourceCodeEnd":1335,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/app-server-protocol/src/export.rs#L1299-L1335","documentation":"Error \"schema definition collision in {location}: {name} (existing title: {existing_title}, new title: {new_title}); use #[schemars(rename = \"...\")] to rename one of the conflicting schema definitions\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/app-server-protocol/src/export.rs:1317 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"}