paperclipai/paperclip · error · Error
Invalid --adapter-override "${raw}". Use slug=type.
Error message
Invalid --adapter-override "${raw}". Use slug=type. What it means
Thrown by parseAdapterOverrides in the CLI teams command when an --adapter-override value splits on '=' but yields an empty slug or empty adapter type. The flag expects slug=type pairs that map a catalog adapter slug to an adapter type. It is a CLI argument validation error surfaced before any network call.
Source
Thrown at cli/src/commands/client/teams.ts:508
for (const raw of values) {
const [key, value] = parseKeyValueOption(raw, "--secret-value", "key=value");
if (!key) {
throw new Error(`Invalid --secret-value "${raw}". Use key=value.`);
}
result[key] = value;
}
return result;
}
function parseAdapterOverrides(
values: string[] | undefined,
): CatalogTeamInstallOptions["adapterOverrides"] | undefined {
if (!values || values.length === 0) return undefined;
const result: NonNullable<CatalogTeamInstallOptions["adapterOverrides"]> = {};
for (const raw of values) {
const [slug, adapterType] = parseKeyValueOption(raw, "--adapter-override", "slug=type");
if (!slug || !adapterType) {
throw new Error(`Invalid --adapter-override "${raw}". Use slug=type.`);
}
result[slug] = { adapterType };
}
return result;
}
function parseKeyValueOption(raw: string, flag: string, format: string): [string, string] {
const separator = raw.indexOf("=");
if (separator <= 0) {
throw new Error(`Invalid ${flag} "${raw}". Use ${format}.`);
}
return [raw.slice(0, separator).trim(), raw.slice(separator + 1).trim()];
}
function removeUndefined<T extends Record<string, unknown>>(input: T): T {
return Object.fromEntries(Object.entries(input).filter(([, value]) => value !== undefined)) as T;
}
View on GitHub (pinned to 67001ec6eb)
Solutions
- Re-run with a well-formed pair, e.g. --adapter-override "my-slug=claude".
- Check shell expansion: quote the whole value and confirm the slug and type are non-empty after trim.
- If passing multiple overrides, pass --adapter-override once per pair rather than comma-separating.
Example fix
// before --adapter-override "=claude" // after --adapter-override "my-agent=claude"
Defensive patterns
Strategy: validation
Validate before calling
function isValidAdapterOverride(raw: string): boolean {
const sep = raw.indexOf("=");
if (sep <= 0) return false;
const slug = raw.slice(0, sep).trim();
const type = raw.slice(sep + 1).trim();
return slug.length > 0 && type.length > 0;
}
for (const raw of overrides) {
if (!isValidAdapterOverride(raw)) {
console.error(`Skipping invalid --adapter-override "${raw}". Expected slug=type.`);
continue;
}
} Type guard
function isAdapterOverridePair(raw: string): raw is string {
const sep = raw.indexOf("=");
if (sep <= 0) return false;
return raw.slice(0, sep).trim().length > 0 && raw.slice(sep + 1).trim().length > 0;
} Prevention
- Quote the whole slug=type value so the shell passes it as one argv entry.
- Validate override strings in your wrapper script before invoking the CLI.
- Pass each override as a separate --adapter-override flag rather than comma-separated.
When it happens
Trigger: Running `paperclipai ... teams install --adapter-override "=claude"` (empty slug), `--adapter-override "codex="` (empty type), or `--adapter-override " = "` (whitespace only). parseKeyValueOption returns trimmed halves; if either is empty the post-split guard at teams.ts:510 fires.
Common situations: Shell quoting mistakes that drop one side of the pair, copy-pasting an override whose type was a variable that expanded to empty, or typos like `slug:type` (colon instead of equals).
Related errors
- Company ID is required.
- Catalog team reference is required.
- Catalog team not found: ${catalogRef}
- Approval request failed.
- Invalid --name-override "${raw}". Use slug=name.
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/09b3a01d8ad42d3c.
Report an issue: GitHub.