paperclipai/paperclip · error · Error

No companies are accessible with this board credential.

Error message

No companies are accessible with this board credential.

What it means

chooseCompany got an empty companies array with optional=false, meaning the board credential cannot see any company (or none exist), so company selection is impossible.

Solutions

  1. Verify the board credential is valid and has access to at least one company; create a company first if none exists.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/client/connect.ts:195 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/445726c528dcbcfd. Report an issue: GitHub.

Appendix: source

Thrown at cli/src/commands/client/connect.ts:195

async function askProfileName(defaultName: string): Promise<string> {
  const profile = await p.text({
    message: "Profile name",
    initialValue: defaultName || "default",
  });
  assertNotCancelled(profile);
  const value = String(profile).trim();
  if (!value) throw new Error("Profile name is required");
  return value;
}

async function chooseCompany(
  companies: Company[],
  preferredCompanyId: string | undefined,
  opts: { optional: boolean },
): Promise<Company | null> {
  if (companies.length === 0) {
    if (opts.optional) return null;
    throw new Error("No companies are accessible with this board credential.");
  }
  const preferred = preferredCompanyId ? companies.find((company) => company.id === preferredCompanyId) : null;
  if (companies.length === 1 && !opts.optional) return companies[0] ?? null;
  const selected = await p.select({
    message: opts.optional ? "Default company for this profile" : "Agent company",
    initialValue: preferred?.id ?? companies[0]?.id,
    options: [
      ...(opts.optional ? [{ value: "", label: "(none)" }] : []),
      ...companies.map((company) => ({
        value: company.id,
        label: company.name,
        hint: company.id,
      })),
    ],
  });
  assertNotCancelled(selected);
  if (!selected) return null;
  return companies.find((company) => company.id === selected) ?? null;

View on GitHub (pinned to 120ae5428f)