warpdotdev/warp · error · anyhow::Error
No environments are configured for this account. You can cre
Error message
No environments are configured for this account.
You can create an environment with `{cli_name} environment create`.
Or, re-run this command with `--no-environment` to not use an environment.
Without an environment, the agent will not be able to access private repositories or create pull requests. What it means
Returned by environment resolution for agent creation (common.rs) when the account has no synced environments: the options list built from the drive contains only the single EnvironmentChoice::None sentinel. It is a deliberate, user-actionable configuration error, telling the user to create an environment or explicitly opt out with --no-environment.
Source
Thrown at app/src/ai/agent_sdk/common.rs:275
synced_environments
.sort_by_key(|(_, env)| env.model().string_model.name.to_lowercase());
let environments: Vec<EnvironmentChoice> = synced_environments
.into_iter()
.map(|(server_id, env)| EnvironmentChoice::Environment {
id: server_id.to_string(),
name: env.model().string_model.name.clone(),
})
.collect();
let mut options = vec![EnvironmentChoice::None];
options.extend(environments);
// If there are no synced environments, require the user to create one or use --no-environment.
if options.len() == 1 {
let cli_name = warp_cli::binary_name().unwrap_or_else(|| "warp".to_string());
return Err(ResolveConfigurationError::Other(anyhow::anyhow!(
"No environments are configured for this account.\n\
You can create an environment with `{cli_name} environment create`.\n\
Or, re-run this command with `--no-environment` to not use an environment.\n\
Without an environment, the agent will not be able to access private repositories or create pull requests.",
)));
}
let prompt = "Select an environment to run the agent in (or 'No environment'):";
let choice = Select::new(prompt, options).prompt();
match choice {
Ok(choice) => Ok(choice),
Err(InquireError::OperationCanceled | InquireError::OperationInterrupted) => {
Err(ResolveConfigurationError::Canceled)
}
Err(err) => Err(ResolveConfigurationError::Other(anyhow::anyhow!(
"Error selecting environment: {err}"View on GitHub (pinned to e72fd7aacb)
Solutions
- Run `warp environment create` (with the binary name reported in the message) to create an environment for the account, then retry.
- Re-run the original command with `--no-environment` if the agent does not need private repo access or PR creation.
- If environments should exist, verify you are logged into the correct account/org and that Warp Drive finished syncing.
Example fix
// before warp agent run --task "fix the bug" // after warp environment create # then retry, or: warp agent run --task "fix the bug" --no-environment
Defensive patterns
Strategy: validation
Validate before calling
// Pre-check before triggering interactive resolution:
let has_environments = synced_environment_count(ctx) > 0;
if !has_environments && !args.no_environment && args.environment.is_none() {
eprintln!("no environments on this account; pass --no-environment or create one");
} Try / catch
match resolve_environment(&args, ctx) {
Err(ResolveConfigurationError::Other(err)) if err.to_string().starts_with("No environments are configured") => {
// surface the create/no-environment guidance instead of a raw error
}
other => other,
} Prevention
- Script non-interactive flows with --no-environment or an explicit --environment flag.
- Provision at least one environment per team as part of onboarding.
- Treat this message as a setup checklist item, not a bug: create an environment or opt out.
When it happens
Trigger: Invoking the interactive environment picker (resolve path that builds Vec<EnvironmentChoice> from synced environments) when Warp Drive returned zero environments for the account — options.len() == 1 after prepending the None choice. Requires Drive to have been synced first, so this genuinely means the account has none.
Common situations: New accounts or teams where no warp environments have been created yet; a teammate who was never added to an environment; or scripting the command without --no-environment in CI where interactive setup was never done.
Related errors
- Error selecting environment: {err}
- MCP server '{name}' config must be a JSON object
- MCP server '{name}' field 'warp_id' must be a UUID
- MCP server '{name}' field 'warp_id' must be non-empty
- could not determine home directory
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/ce99ce4482f71fd7.
Report an issue: GitHub.