paperclipai/paperclip · warning · Error

Profile name is required

Error message

Profile name is required

What it means

Thrown by askProfileName when the interactive profile-name prompt yields an empty value after trimming. The CLI will not persist a profile with no name.

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 67001ec6eb)

Solutions

  1. Re-run connect and type a non-empty profile name.
  2. Pre-set the profile name non-interactively if the command supports it (e.g., --profile).
Defensive patterns

Strategy: validation

Validate before calling

const name = String(await p.text({message: 'Profile name', initialValue: 'default'})).trim();
if (!name) throw new Error('Profile name is required');

Prevention

When it happens

Trigger: User submits the @clack/prompts text prompt empty or with only whitespace during `paperclipai connect`.

Common situations: Accidental Enter at the prompt; paste of whitespace; terminal input glitch.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/04b11abd17293de0. Report an issue: GitHub.