paperclipai/paperclip · error
Select a company to test adapter environment
Error message
Select a company to test adapter environment
What it means
The 'test environment' mutation was triggered while no company is selected in the agent form. The adapter environment test runs against a company's environment, so the client-side guard blocks the call.
Source
Thrown at ui/src/components/AgentConfigForm.tsx:899
// The agent has no own environment, so the Test resolves the instance
// default, the local default, or the managed sandbox. Resolve the
// settings, the environment list, and the managed-sandbox-only policy
// here, because the render-time queries can be unsettled, or the
// environments query can be disabled under the managed-sandbox-only
// policy. A failure surfaces an honest error, not a silent host probe
// that reports a false result.
try {
const [resolvedSettings, resolvedEnvironments, resolvedExperimental] =
await Promise.all([
queryClient.ensureQueryData({
queryKey: queryKeys.instance.settings,
queryFn: () => instanceSettingsApi.get(),
}),
queryClient.ensureQueryData({
queryKey: queryKeys.environments.list(selectedCompanyId),
queryFn: () => environmentsApi.list(selectedCompanyId),
}),
queryClient.ensureQueryData({
queryKey: queryKeys.instance.experimentalSettings,
queryFn: () => instanceSettingsApi.getExperimental(),
}),
]);
settings = resolvedSettings;
environmentList = resolvedEnvironments;
managedSandboxOnly = resolvedExperimental?.enableManagedSandboxOnly === true;
} catch {
throw new Error(
"Could not load environment settings to determine which environment to test in. Retry the test.",
);
}
}
// Mirror the server run-time resolution, including the managed-sandbox-only
// redirect: when the resolution lands on the local environment and the
// policy is on, probe the managed sandbox the real run uses instead. The
// resolver throws when no managed sandbox is available, which the mutation
// surfaces as a fail-closed error rather than a local host probe.View on GitHub (pinned to 01ad858492)
Solutions
- Select a company from the company picker before testing the adapter environment.
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at ui/src/components/AgentConfigForm.tsx:828 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@01ad858492 (2026-08-18).
Data as JSON: /api/errors/3faac8ec3e4bd78a.
Report an issue: GitHub.