paperclipai/paperclip · warning · Error
Choose either --rpc-only or --wham-only, not both.
Error message
Choose either --rpc-only or --wham-only, not both.
What it means
Thrown by the Codex quota-probe CLI main() when both --rpc-only and --wham-only flags are passed. The two flags restrict the probe to mutually exclusive quota sources (the RPC quota path vs. the WHAM/token-based path), so passing both is contradictory and the CLI refuses rather than arbitrarily choosing one.
Source
Thrown at packages/adapters/codex-local/src/cli/quota-probe.ts:38
json: argv.includes("--json"),
rpcOnly: argv.includes("--rpc-only"),
whamOnly: argv.includes("--wham-only"),
};
}
function stringifyError(error: unknown): string {
return error instanceof Error ? error.message : String(error);
}
function quotaErrorFamilyJson(error: unknown): Record<string, string> {
const errorFamily = readCodexQuotaErrorFamily(error);
return errorFamily ? { errorFamily } : {};
}
async function main() {
const args = parseArgs(process.argv.slice(2));
if (args.rpcOnly && args.whamOnly) {
throw new Error("Choose either --rpc-only or --wham-only, not both.");
}
const auth = await readCodexAuthInfo();
const token = await readCodexToken();
const result: Record<string, unknown> = {
timestamp: new Date().toISOString(),
auth,
tokenAvailable: token != null,
};
if (!args.whamOnly) {
try {
result.rpc = {
ok: true,
...(await fetchCodexRpcQuota()),
};
} catch (error) {View on GitHub (pinned to 67001ec6eb)
Solutions
- Pass at most one of --rpc-only or --wham-only; omitting both runs both quota sources (default).
- Audit the calling script for logic that can set both flags at once.
- Use --json and filter the section you want client-side instead of restricting in-process.
Example fix
// before node quota-probe.js --rpc-only --wham-only // after node quota-probe.js --rpc-only
Defensive patterns
Strategy: validation
Validate before calling
if (args.rpcOnly && args.whamOnly) {
console.error("Pass at most one of --rpc-only / --wham-only");
process.exit(2);
} Prevention
- Use a single --source rpc|wham|both selector instead of two mutually-exclusive booleans.
- Validate flag exclusivity in wrapper scripts.
- Document the mutual exclusion at the flag definitions.
When it happens
Trigger: Invoking the Codex quota-probe binary with both flags: `node quota-probe.js --rpc-only --wham-only`. parseArgs sets both booleans true and main() throws before reading auth/quota.
Common situations: A wrapper script that conditionally appends both flags; copy-pasting flags from two examples; a job template that listed both options defensively.
Related errors
- Choose either --oauth-only or --cli-only, not both.
- --payload must be a JSON object
- ${name} must be a JSON object
- Invalid ${name} JSON: ${err instanceof Error ? err.message :
- --file is required
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/f1113ebbc0e82cb0.
Report an issue: GitHub.