paperclipai/paperclip · error · Error
No company found by shortname/prefix '${selector}'.
Error message
No company found by shortname/prefix '${selector}'. What it means
Thrown by resolveCompanyForDeletion when by==='prefix' (or auto resolves to prefix) and no company matches the selector by issue prefix. Prefix matching is case-insensitive exact equality against company.issuePrefix.
Source
Thrown at cli/src/commands/client/company.ts:1294
): Company {
const selector = normalizeSelector(selectorRaw);
if (!selector) {
throw new Error("Company selector is required.");
}
const idMatch = companies.find((company) => company.id === selector);
const prefixMatch = companies.find((company) => matchesPrefix(company, selector));
if (by === "id") {
if (!idMatch) {
throw new Error(`No company found by ID '${selector}'.`);
}
return idMatch;
}
if (by === "prefix") {
if (!prefixMatch) {
throw new Error(`No company found by shortname/prefix '${selector}'.`);
}
return prefixMatch;
}
if (idMatch && prefixMatch && idMatch.id !== prefixMatch.id) {
throw new Error(
`Selector '${selector}' is ambiguous (matches both an ID and a shortname). Re-run with --by id or --by prefix.`,
);
}
if (idMatch) return idMatch;
if (prefixMatch) return prefixMatch;
throw new Error(
`No company found for selector '${selector}'. Use company ID or issue prefix (for example PAP).`,
);
}
View on GitHub (pinned to 67001ec6eb)
Solutions
- Run 'paperclipai company list' and read the exact issue prefix column.
- If you actually have the id, use '--by id' instead.
- Drop --by to let auto-resolution attempt both id and prefix.
- Double-check capitalization is irrelevant (match is case-insensitive) but spelling matters.
Example fix
# before paperclipai company delete PPA --by prefix --yes --confirm PPA # after grep -i prefix <(paperclipai company list) # confirm exact prefix paperclipai company delete PAP --by prefix --yes --confirm PAP
Defensive patterns
Strategy: validation
Validate before calling
function ensureCompanyByPrefix(companies: { issuePrefix: string }[], selector: string): void {
const upper = selector.toUpperCase();
if (!companies.some((c) => c.issuePrefix.toUpperCase() === upper)) {
throw new Error(`No company with prefix '${selector}'. Run 'company list'.`);
}
} Type guard
function companyPrefixExists(companies: { issuePrefix: string }[], selector: string): boolean {
const upper = selector.toUpperCase();
return companies.some((c) => c.issuePrefix.toUpperCase() === upper);
} Prevention
- Read prefixes from 'company list' rather than memory.
- Remember prefix match is case-insensitive but spelling must be exact.
- Switch to '--by id' when prefix lookups repeatedly miss.
When it happens
Trigger: Passing --by prefix with a selector that is not any company's issue prefix. A typo in the prefix (e.g. 'PPA' instead of 'PAP'). A prefix from a company in a different list/tenant than the one supplied.
Common situations: User misremembers the 3-letter prefix. The prefix was renamed. Wrong tenant's company list supplied to the resolver. Trailing whitespace or hyphenation differences.
Related errors
- No company found by ID '${selector}'.
- Selector '${selector}' is ambiguous (matches both an ID and
- No company found for selector '${selector}'. Use company ID
- Company selector is required.
- Deletion requires --yes.
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/5d2bb65b8edc1b3b.
Report an issue: GitHub.