tinyhumansai/openhuman · error · ValidationError
Invalid ${paramName}[${index}]: ${errorMsg}
Error message
Invalid ${paramName}[${index}]: ${errorMsg} What it means
Missing-value error from `parse_tick_flags` in the subconscious CLI. `--workspace`/`-w` expects its path as the immediately next token; when the flag is the last token on the line, `args.get(i + 1)` is None and this error fires before any workspace is touched.
Source
Thrown at app/src/lib/mcp/validation.ts:67
}
/**
* Validate list of IDs
*/
export function validateIdList(value: unknown, paramName: string): Array<number | string> {
if (!Array.isArray(value)) {
throw new ValidationError(`Invalid ${paramName}: must be an array of IDs.`);
}
return value.map((item: unknown, index: number) => {
try {
return validateId(item, `${paramName}[${index}]`);
} catch (error) {
if (error instanceof ValidationError) {
throw error;
}
const errorMsg = error instanceof Error ? error.message : String(error);
throw new ValidationError(`Invalid ${paramName}[${index}]: ${errorMsg}`);
}
});
}
/**
* Validate a positive integer parameter (e.g. message IDs)
*/
export function validatePositiveInt(value: unknown, paramName: string): number {
if (typeof value === 'number') {
if (!Number.isInteger(value) || value <= 0) {
throw new ValidationError(`Invalid ${paramName}: ${value}. Must be a positive integer.`);
}
return value;
}
if (typeof value === 'string') {
const intValue = Number.parseInt(value, 10);
if (Number.isNaN(intValue) || intValue <= 0) {View on GitHub (pinned to a221052e0d)
Solutions
- Supply the path as the next token: `--workspace /path/to/ws`
- Or drop the flag to use the default workspace
- Default empty variables in scripts instead of emitting a bare flag
Example fix
# before openhuman subconscious tick --workspace # after openhuman subconscious tick --workspace /tmp/fresh-ws
Defensive patterns
Strategy: validation
Validate before calling
# bash: never emit a bare -w/--workspace
if [ -n "${WS:-}" ]; then set -- --workspace "$WS" "$@"; fi # pair built as a unit
last="${!#}"
[ "$last" = "-w" ] || [ "$last" = "--workspace" ] && { echo 'missing value for --workspace' >&2; exit 2; }
openhuman subconscious tick "$@" Try / catch
if ! out=$(openhuman subconscious tick "$@" 2>&1); then case "$out" in *"missing value for --workspace"*) echo 'pass the path as the next token or drop the flag' >&2; exit 2;; esac printf '%s\n' "$out" >&2; exit 1 fi
Prevention
- Emit flag and value as one quoted unit from scripts so they can never separate
When it happens
Trigger: `openhuman subconscious tick --workspace` (nothing after); `-w` as the final token; a shell line-continuation where the value line was lost; a script conditionally appending the flag but not the value.
Common situations: Truncated commands from history editing; templated invocations where the workspace variable was empty and only the flag survived.
Related errors
- Invalid ${paramName}: must be an array of IDs.
- PAYMENT_REQUIRED
- Sentry.flush(2000) timed out — event may not have reached Se
- audio blob is empty
- voice_not_compiled
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/921f500c95cacf9e.
Report an issue: GitHub.