paperclipai/paperclip · error · Error

Profile name is required

Error message

Profile name is required

What it means

askProfileName trims the interactive text input and got an empty string, so the profile would have no name to save under.

Solutions

  1. Pass a profile name (e.g. --profile <name>) when saving the context.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cli/src/commands/client/connect.ts:184 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/04b11abd17293de0. Report an issue: GitHub.

Appendix: source

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

  const selected = await p.select({
    message: "Connect as",
    options: [
      { value: "board", label: "Board operator" },
      { value: "agent", label: "Agent in a company" },
    ],
  });
  assertNotCancelled(selected);
  return selected as "board" | "agent";
}

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: [

View on GitHub (pinned to 120ae5428f)