paperclipai/paperclip · error · Error
Company ID is required. Pass --company-id or set…
Error message
Company ID is required. Pass --company-id or set PAPERCLIP_COMPANY_ID.
What it means
disableAllRoutinesInConfig resolved the company scope from --company-id and PAPERCLIP_COMPANY_ID and found neither, so it cannot tell which company's routines to disable.
Solutions
- Pass --company-id or set PAPERCLIP_COMPANY_ID.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at cli/src/commands/routines.ts:245 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/035fafc9bfa145dd.
Report an issue: GitHub.
Appendix: source
Thrown at cli/src/commands/routines.ts:245
} catch (error) {
if (embeddedHandle?.startedByThisProcess) {
await embeddedHandle.stop().catch(() => undefined);
}
throw error;
}
}
export async function disableAllRoutinesInConfig(
options: Pick<RoutinesDisableAllOptions, "config" | "companyId">,
): Promise<DisableAllRoutinesResult> {
const configPath = resolveConfigPath(options.config);
loadPaperclipEnvFile(configPath);
const companyId =
nonEmpty(options.companyId)
?? nonEmpty(process.env.PAPERCLIP_COMPANY_ID)
?? null;
if (!companyId) {
throw new Error("Company ID is required. Pass --company-id or set PAPERCLIP_COMPANY_ID.");
}
const config = readConfig(configPath);
if (!config) {
throw new Error(`Config not found at ${configPath}.`);
}
let embeddedHandle: EmbeddedPostgresHandle | null = null;
let db: ClosableDb | null = null;
try {
if (config.database.mode === "embedded-postgres") {
embeddedHandle = await ensureEmbeddedPostgres(
config.database.embeddedPostgresDataDir,
config.database.embeddedPostgresPort,
);
const adminConnectionString = `postgres://paperclip:paperclip@127.0.0.1:${embeddedHandle.port}/postgres`;
await ensurePostgresDatabase(adminConnectionString, "paperclip");
const connectionString = `postgres://paperclip:paperclip@127.0.0.1:${embeddedHandle.port}/paperclip`;View on GitHub (pinned to 120ae5428f)