tinyhumansai/openhuman · error · Error
unknown case '${name}' (valid: ${ALL_CASES.join(", ")})
Error message
unknown case '${name}' (valid: ${ALL_CASES.join(", ")}) What it means
goals-live.mjs validates every --case value against ALL_CASES = ["list", "add", "edit", "delete", "reflect", "list-final"] before running. The throw fires in parseArgs when the supplied case name is not in that list, and the message helpfully prints the valid set. It is a fail-fast CLI argument check so the script never starts a core, spends tokens, or mutates goals for a case that does not exist.
Source
Thrown at scripts/debug/goals-live.mjs:104
case "--token":
opts.token = next();
break;
case "--workspace":
opts.workspace = next();
break;
case "--spawn-core":
opts.spawnCore = true;
break;
case "--isolated-workspace":
opts.isolatedWorkspace = true;
break;
case "--keep-workspace":
opts.keepWorkspace = true;
break;
case "--case": {
const name = next();
if (!ALL_CASES.includes(name))
throw new Error(`unknown case '${name}' (valid: ${ALL_CASES.join(", ")})`);
opts.cases.push(name);
break;
}
case "--reset":
opts.reset = true;
break;
case "--context":
opts.context = next();
break;
case "--model":
opts.model = next();
break;
case "--show-thoughts":
opts.showThoughts = true;
break;
case "--rpc-timeout-ms":
opts.rpcTimeoutMs = Number(next());
break;View on GitHub (pinned to a221052e0d)
Solutions
- Re-run with the exact valid name printed in the message, e.g. `--case list` or `--case reflect`
- Run `node scripts/debug/goals-live.mjs --help` (or `pnpm debug goals-live -- -h`) to see the current case list
- If the name came from docs, check scripts/debug/goals-live-cases.md for the up-to-date case descriptions
- Repeat --case flags to run a subset; omit --case entirely to run all six cases
Example fix
// before node scripts/debug/goals-live.mjs --case lst // after node scripts/debug/goals-live.mjs --case list
Defensive patterns
Strategy: validation
Validate before calling
// before invoking the script, assert case names against the same closed set
const VALID = ["list", "add", "edit", "delete", "reflect", "list-final"];
const cases = argv.filter((a, i) => argv[i - 1] === "--case");
const bad = cases.filter((c) => !VALID.includes(c));
if (bad.length) {
console.error(`invalid --case values: ${bad.join(", ")}; valid: ${VALID.join(", ")}`);
process.exit(2);
} Type guard
const isGoalCase = (name) => ["list", "add", "edit", "delete", "reflect", "list-final"].includes(name);
Prevention
- Let the script default to all cases (omit --case) when the exact name is uncertain
- Keep scripts/debug/goals-live-cases.md in sync when cases change so docs never advertise dead names
- In wrappers, source the valid list from the script itself (grep ALL_CASES) instead of hardcoding
When it happens
Trigger: Running `node scripts/debug/goals-live.mjs --case lst` (typo), `--case reflect-` or any renamed/removed case name; also copying a case name from an older revision of the script or from harness-live-audit-cases.md terminology into --case.
Common situations: Typos at the terminal, tab-completion absence in the pnpm debug wrapper, or a case list drift after the script was updated (e.g. list-final added later) while muscle memory or docs reference old names.
Related errors
- unknown option: ${arg}
- --isolated-workspace requires --spawn-core
- unknown option: ${arg}
- missing value for ${arg}
- ${label} must be an integer between 1 and 65535
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/e09bf3425c26667d.
Report an issue: GitHub.