warpdotdev/warp · error

Error selecting image

Error message

Error selecting image

What it means

Reported when the interactive Select::new("Select a base image:", ...).prompt() during environment creation returns an InquireError that is NOT OperationCanceled or OperationInterrupted (those are handled gracefully by handle_inquire_error, which prints 'Environment creation canceled.' and exits cleanly). It means the prompt itself malfunctioned — typically an IO error because stdin/stdout is not an interactive TTY.

Source

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

                        "No docker image provided, please select a base image.\n"
                    );
                    println!(
                        "All warpdotdev images contain Python and Node, in addition to language-specific tooling. For more info: {}\n",
                        WARP_DEV_ENVIRONMENTS_REPO
                    );

                    let mut image_choices: Vec<String> =
                        output.images.into_iter().map(|img| img.image).collect();
                    image_choices.push(CUSTOM_IMAGE_OPTION.to_string());

                    let selected_image = match Select::new("Select a base image:", image_choices)
                        .prompt()
                    {
                        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;

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. Pass --docker-image <image> so the interactive prompt is skipped entirely (create only prompts when the flag is absent)
  2. Run the command in an interactive TTY (e.g. ssh -t for remote sessions)
  3. In scripts, detect [ -t 0 ] and require the --docker-image flag before calling create
  4. For unattended flows, never rely on the image-selection prompt

Example fix

# before (CI, no TTY)
warp environment create --name dev --repo owner/repo

# after (CI, no TTY)
warp environment create --name dev --repo owner/repo --docker-image warpdotdev/base:latest
Defensive patterns

Strategy: try-catch

Validate before calling

# Shell: only attempt the interactive create when a TTY is present
# [ -t 0 ] || { echo "requires --docker-image in non-interactive mode"; exit 2; }

Type guard

fn is_interactive() -> bool {
    std::io::stdin().is_terminal() && std::io::stdout().is_terminal()
}

Try / catch

match Select::new("Select a base image:", choices).prompt() {
    Ok(image) => image,
    Err(InquireError::OperationCanceled | InquireError::OperationInterrupted) => { /* clean exit */ },
    Err(err) => { /* IO/TTY failure: fall back to requiring --docker-image */ },
}

Prevention

When it happens

Trigger: Running `warp environment create` without --docker-image inside CI, a script, a pipe, an SSH session without TTY allocation, or any non-interactive context where the inquire crate cannot render the select menu or read key input.

Common situations: Automation/CI pipelines invoking the create command unattended; piping input into the CLI; running under a process supervisor; terminal emulator incompatibility; stdin redirected from /dev/null.

Related errors


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