{"record":{"id":"c27cd869d898e4b2","repo":"warpdotdev/warp","slug":"error-entering-custom-image","errorCode":null,"errorMessage":"Error entering custom image","messagePattern":"Error entering custom image","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/environment.rs","lineNumber":396,"sourceCode":"                        Ok(image) => image,\n                        Err(err) => {\n                            if !Self::handle_inquire_error(err, ctx) {\n                                super::report_fatal_error(\n                                    anyhow::anyhow!(\"Error selecting image\"),\n                                    ctx,\n                                );\n                            }\n                            return;\n                        }\n                    };\n\n                    let final_image = if selected_image == CUSTOM_IMAGE_OPTION {\n                        match inquire::Text::new(\"Enter custom Docker image name:\").prompt() {\n                            Ok(custom) => custom,\n                            Err(err) => {\n                                if !Self::handle_inquire_error(err, ctx) {\n                                    super::report_fatal_error(\n                                        anyhow::anyhow!(\"Error entering custom image\"),\n                                        ctx,\n                                    );\n                                }\n                                return;\n                            }\n                        }\n                    } else {\n                        selected_image\n                    };\n\n                    continuation(final_image, ctx);\n                }\n                ListWarpDevImagesResult::UserFacingError(_) | ListWarpDevImagesResult::Unknown => {\n                    super::report_fatal_error(\n                        anyhow::anyhow!(\"Failed to fetch list of base images\"),\n                        ctx,\n                    );\n                }","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/environment.rs#L378-L414","documentation":"Reported when the user selects the 'Custom Docker image' option in the base-image prompt and the follow-up inquire::Text::new(\"Enter custom Docker image name:\").prompt() fails with an error other than OperationCanceled/OperationInterrupted (those exit cleanly via handle_inquire_error). Like error 108 this is a prompt-infrastructure failure, usually IO-related in non-interactive contexts.","triggerScenarios":"Choosing 'Custom Docker image' in the Select prompt while stdin/stdout is not a usable TTY, or the terminal drops out mid-prompt (session close, terminal crash), causing the text prompt to error.","commonSituations":"Same class as error 108 — CI, scripts, pipes — but only hit after deliberately (or accidentally) selecting the custom-image entry; SSH sessions that lose the TTY between the two prompts.","solutions":["Avoid the nested prompt: pass --docker-image <custom-image> directly on the command line","Run in a real interactive terminal","In automation, guard with a TTY check and supply --docker-image explicitly","If the terminal died mid-flow, just re-run the create command"],"exampleFix":"# before\nwarp environment create --name dev   # then pick 'Custom Docker image' and hit prompt failure\n\n# after\nwarp environment create --name dev --docker-image myregistry/my-image:1.0","handlingStrategy":"try-catch","validationCode":"// Provide the custom image up front so the nested Text prompt never runs:\n// warp environment create --docker-image myregistry/my-image:1.0 ...","typeGuard":null,"tryCatchPattern":"match inquire::Text::new(\"Enter custom Docker image name:\").prompt() {\n    Ok(custom) => custom,\n    Err(InquireError::OperationCanceled | InquireError::OperationInterrupted) => { /* clean exit */ },\n    Err(err) => { /* IO failure — abort creation, suggest --docker-image */ },\n}","preventionTips":["Supply custom images via --docker-image instead of the interactive custom entry","Keep the terminal session alive across both prompts in the create flow","Avoid selecting 'Custom Docker image' in non-interactive or flaky terminals","Distinguish cancel/interrupt (clean) from IO errors (fatal) when handling inquire results"],"tags":["rust","cli","interactive-prompt","tty","inquire"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}