{"record":{"id":"f37baa23860d7eac","repo":"openai/codex","slug":"forking-with-images-requires-a-prompt","errorCode":null,"errorMessage":"Forking with images requires a prompt","messagePattern":"Forking with images requires a prompt","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/exec/src/lib.rs","lineNumber":770,"sourceCode":"                let mut items: Vec<UserInput> = imgs\n                    .into_iter()\n                    .chain(args.images.iter().cloned())\n                    .map(|path| UserInput::LocalImage { path, detail: None })\n                    .collect();\n                items.push(UserInput::Text {\n                    text: prompt_text.clone(),\n                    text_elements: Vec::new(),\n                });\n                let output_schema = load_output_schema(output_schema_path);\n                (\n                    InitialOperation::UserTurn {\n                        items,\n                        output_schema,\n                    },\n                    prompt_text,\n                )\n            } else if !imgs.is_empty() || !args.images.is_empty() {\n                anyhow::bail!(\"Forking with images requires a prompt\");\n            } else if output_schema_path.is_some() || last_message_file.is_some() {\n                anyhow::bail!(\"Forking with output options requires a prompt\");\n            } else if config.ephemeral {\n                anyhow::bail!(\"Ephemeral forks require a prompt\");\n            } else {\n                (InitialOperation::ForkOnly, String::new())\n            }\n        }\n        (None, root_prompt, imgs) => {\n            let prompt_text = resolve_root_prompt(root_prompt);\n            let mut items: Vec<UserInput> = imgs\n                .into_iter()\n                .map(|path| UserInput::LocalImage { path, detail: None })\n                .collect();\n            items.push(UserInput::Text {\n                text: prompt_text.clone(),\n                // CLI input doesn't track UI element ranges, so none are available here.\n                text_elements: Vec::new(),","sourceCodeStart":752,"sourceCodeEnd":788,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/exec/src/lib.rs#L752-L788","documentation":"Error \"Forking with images requires a prompt\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/exec/src/lib.rs:770 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a prompt when forking with images."],"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"}