warpdotdev/warp · error

Error entering custom image

Error message

Error entering custom image

What it means

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.

Source

Thrown at app/src/ai/agent_sdk/environment.rs:396

                        Ok(image) => image,
                        Err(err) => {
                            if !Self::handle_inquire_error(err, ctx) {
                                super::report_fatal_error(
                                    anyhow::anyhow!("Error selecting image"),
                                    ctx,
                                );
                            }
                            return;
                        }
                    };

                    let final_image = if selected_image == CUSTOM_IMAGE_OPTION {
                        match inquire::Text::new("Enter custom Docker image name:").prompt() {
                            Ok(custom) => custom,
                            Err(err) => {
                                if !Self::handle_inquire_error(err, ctx) {
                                    super::report_fatal_error(
                                        anyhow::anyhow!("Error entering custom image"),
                                        ctx,
                                    );
                                }
                                return;
                            }
                        }
                    } else {
                        selected_image
                    };

                    continuation(final_image, ctx);
                }
                ListWarpDevImagesResult::UserFacingError(_) | ListWarpDevImagesResult::Unknown => {
                    super::report_fatal_error(
                        anyhow::anyhow!("Failed to fetch list of base images"),
                        ctx,
                    );
                }

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. Avoid the nested prompt: pass --docker-image <custom-image> directly on the command line
  2. Run in a real interactive terminal
  3. In automation, guard with a TTY check and supply --docker-image explicitly
  4. If the terminal died mid-flow, just re-run the create command

Example fix

# before
warp environment create --name dev   # then pick 'Custom Docker image' and hit prompt failure

# after
warp environment create --name dev --docker-image myregistry/my-image:1.0
Defensive patterns

Strategy: try-catch

Validate before calling

// Provide the custom image up front so the nested Text prompt never runs:
// warp environment create --docker-image myregistry/my-image:1.0 ...

Try / catch

match inquire::Text::new("Enter custom Docker image name:").prompt() {
    Ok(custom) => custom,
    Err(InquireError::OperationCanceled | InquireError::OperationInterrupted) => { /* clean exit */ },
    Err(err) => { /* IO failure — abort creation, suggest --docker-image */ },
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16). Data as JSON: /api/errors/c27cd869d898e4b2. Report an issue: GitHub.