jackwener/OpenCLI · error · ArgumentError
openreview ${label} "${value}" is not a valid forum id (expe
Error message
openreview ${label} "${value}" is not a valid forum id (expected 6-20 chars of [A-Za-z0-9_-]) What it means
requireForumId throws ArgumentError when the value is present but does not match ID_PATTERN (6-20 chars of [A-Za-z0-9_-]). This catches typos, pasted URLs, or ids with slashes before a request is made. Only forum ids, not profile ids (~Name1), pass this pattern.
Source
Thrown at clis/openreview/utils.js:53
return n;
}
export function requireNonNegativeInt(value, defaultValue, label = 'offset') {
const raw = value ?? defaultValue;
const n = coerceInt(raw);
if (!Number.isInteger(n) || n < 0) {
throw new ArgumentError(`openreview ${label} must be a non-negative integer`);
}
return n;
}
export function requireForumId(value, label = 'id') {
const id = String(value ?? '').trim();
if (!id) {
throw new ArgumentError(`openreview ${label} is required`);
}
if (!ID_PATTERN.test(id)) {
throw new ArgumentError(`openreview ${label} "${value}" is not a valid forum id (expected 6-20 chars of [A-Za-z0-9_-])`);
}
return id;
}
/** OpenReview profile ids are `~...N` slugs and may include dots, hyphens, and Unicode letters. */
const PROFILE_ID_PATTERN = /^~(?=.*\p{L})[\p{L}\p{M}0-9._-]+\d+$/u;
export function requireProfileId(value, label = 'profile') {
const id = String(value ?? '').trim();
if (!id) {
throw new ArgumentError(`openreview ${label} is required`);
}
if (!PROFILE_ID_PATTERN.test(id)) {
throw new ArgumentError(`openreview ${label} "${value}" is not a valid profile id (expected "~First_Last1" or similar; find it on the author's openreview.net profile URL)`);
}
return id;
}
View on GitHub (pinned to 49907e53dc)
Solutions
- Extract just the id from the URL: the last path segment of openreview.net/forum?id=<ID>.
- Verify the id is 6-20 chars limited to letters, digits, underscore, hyphen.
- For venue/invitation lookups, use the venue command (which accepts invitation ids) instead of forum.
Example fix
// before cli forum 'https://openreview.net/forum?id=HkxJq3ZtDr' // after cli forum 'HkxJq3ZtDr'
Defensive patterns
Strategy: validation
Validate before calling
const ID_RE = /^[A-Za-z0-9_-]{6,20}$/;
if (!ID_RE.test(args.id)) { console.error(`invalid forum id: ${args.id}`); process.exit(2); } Type guard
const isValidForumId = (v) => typeof v === 'string' && /^[A-Za-z0-9_-]{6,20}$/.test(v.trim()); Try / catch
try { const id = requireForumId(args.id); } catch (e) { if (e instanceof ArgumentError) { console.error(e.message); process.exit(2); } throw e; } Prevention
- Never paste the full URL; take the ?id= value only.
- Remember forum ids are 6-20 chars of [A-Za-z0-9_-].
- Validate ids in CI/scripts before invoking the command.
When it happens
Trigger: Passing a full openreview.net URL, a forum id containing '/' or '~', an id shorter than 6 or longer than 20 chars, or an id with spaces/punctuation to id(args) or forum(args).
Common situations: Pasting the whole forum URL instead of the id segment; copying an invitation id like 'ICLR.cc/2025/Conference/-/Submission' where a forum id is expected; extra whitespace inside the value; truncating a long id.
Related errors
- openreview ${label} "${value}" is not a valid profile id (ex
- archive search sort must be one of ${SORT_OPTIONS.join(', ')
- archive search mediatype must be one of ${MEDIATYPES.join(',
- archive search limit must be a positive integer
- archive search limit must be <= 100
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/bc5eeac2fb4c330b.
Report an issue: GitHub.