{"record":{"id":"ce99ce4482f71fd7","repo":"warpdotdev/warp","slug":"no-environments-are-configured-for-this-account-y","errorCode":null,"errorMessage":"No environments are configured for this account.\nYou can create an environment with `{cli_name} environment create`.\nOr, re-run this command with `--no-environment` to not use an environment.\nWithout an environment, the agent will not be able to access private repositories or create pull requests.","messagePattern":"No environments are configured for this account\\.\nYou can create an environment with `(.+?) environment create`\\.\nOr, re-run this command with `--no-environment` to not use an environment\\.\nWithout an environment, the agent will not be able to access private repositories or create pull requests\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/common.rs","lineNumber":275,"sourceCode":"\n            synced_environments\n                .sort_by_key(|(_, env)| env.model().string_model.name.to_lowercase());\n\n            let environments: Vec<EnvironmentChoice> = synced_environments\n                .into_iter()\n                .map(|(server_id, env)| EnvironmentChoice::Environment {\n                    id: server_id.to_string(),\n                    name: env.model().string_model.name.clone(),\n                })\n                .collect();\n\n            let mut options = vec![EnvironmentChoice::None];\n            options.extend(environments);\n\n            // If there are no synced environments, require the user to create one or use --no-environment.\n            if options.len() == 1 {\n                let cli_name = warp_cli::binary_name().unwrap_or_else(|| \"warp\".to_string());\n                return Err(ResolveConfigurationError::Other(anyhow::anyhow!(\n                    \"No environments are configured for this account.\\n\\\nYou can create an environment with `{cli_name} environment create`.\\n\\\nOr, re-run this command with `--no-environment` to not use an environment.\\n\\\nWithout an environment, the agent will not be able to access private repositories or create pull requests.\",\n                )));\n            }\n\n            let prompt = \"Select an environment to run the agent in (or 'No environment'):\";\n\n            let choice = Select::new(prompt, options).prompt();\n\n            match choice {\n                Ok(choice) => Ok(choice),\n                Err(InquireError::OperationCanceled | InquireError::OperationInterrupted) => {\n                    Err(ResolveConfigurationError::Canceled)\n                }\n                Err(err) => Err(ResolveConfigurationError::Other(anyhow::anyhow!(\n                    \"Error selecting environment: {err}\"","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/common.rs#L257-L293","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nwarp agent run --task \"fix the bug\"\n\n// after\nwarp environment create   # then retry, or:\nwarp agent run --task \"fix the bug\" --no-environment","handlingStrategy":"validation","validationCode":"// Pre-check before triggering interactive resolution:\nlet has_environments = synced_environment_count(ctx) > 0;\nif !has_environments && !args.no_environment && args.environment.is_none() {\n    eprintln!(\"no environments on this account; pass --no-environment or create one\");\n}","typeGuard":null,"tryCatchPattern":"match resolve_environment(&args, ctx) {\n    Err(ResolveConfigurationError::Other(err)) if err.to_string().starts_with(\"No environments are configured\") => {\n        // surface the create/no-environment guidance instead of a raw error\n    }\n    other => other,\n}","preventionTips":["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."],"tags":["configuration","environments","cli","rust","user-actionable"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}