{"record":{"id":"fe6a78f873dc45da","repo":"openai/codex","slug":"built-in-pinned-thread-section-cannot-be-renamed","errorCode":null,"errorMessage":"built-in pinned thread section cannot be renamed","messagePattern":"built-in pinned thread section cannot be renamed","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/state/src/runtime/thread_sections.rs","lineNumber":44,"sourceCode":"                    .as_ref()\n                    .map(serde_json::to_string)\n                    .transpose()?,\n            )\n            .execute(self.pool.as_ref())\n            .await?;\n\n        Ok(section)\n    }\n\n    /// Rename a custom thread section without changing its stable identity.\n    pub async fn rename_thread_section(\n        &self,\n        id: &str,\n        name: &str,\n        appearance: Option<Option<ThreadSectionAppearance>>,\n    ) -> anyhow::Result<Option<ThreadSection>> {\n        if id == PINNED_THREAD_SECTION_ID {\n            anyhow::bail!(\"built-in pinned thread section cannot be renamed\");\n        }\n\n        let replace_appearance = appearance.is_some();\n        let appearance = appearance\n            .flatten()\n            .map(|appearance| serde_json::to_string(&appearance))\n            .transpose()?;\n        let section = sqlx::query_as::<_, (String, String, Option<String>)>(\n            \"UPDATE thread_sections SET name = ?, appearance = CASE WHEN ? THEN ? ELSE appearance END WHERE id = ? RETURNING id, name, appearance\",\n        )\n        .bind(name)\n        .bind(replace_appearance)\n        .bind(appearance)\n        .bind(id)\n        .fetch_optional(self.pool.as_ref())\n        .await?;\n\n        section.map(ThreadSection::from_row).transpose()","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/state/src/runtime/thread_sections.rs#L26-L62","documentation":"Error \"built-in pinned thread section cannot be renamed\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/state/src/runtime/thread_sections.rs:44 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"}