tinyhumansai/openhuman · error · Error
--isolated-workspace requires --spawn-core
Error message
--isolated-workspace requires --spawn-core
What it means
CLI usage validation in main() of harness-cache-audit. --isolated-workspace creates a throwaway mkdtemp workspace and writes audit agent definitions into it; only a core spawned by this run (--spawn-core) will serve that fresh directory. An already-running attached core is bound to a different workspace, so the flag combination is rejected up front instead of auditing the wrong data silently.
Source
Thrown at scripts/debug/harness-cache-audit.mjs:562
return;
} catch {
await new Promise((resolve) => setTimeout(resolve, 750));
}
}
throw new Error(
`timed out waiting for spawned core at ${coreUrl}\n${stderrFn()}`,
);
}
async function main() {
const opts = parseArgs(process.argv.slice(2));
if (!opts.workspace) opts.workspace = await defaultWorkspace();
let tempWorkspace = "";
let spawned;
if (opts.isolatedWorkspace) {
if (!opts.spawnCore)
throw new Error("--isolated-workspace requires --spawn-core");
tempWorkspace = await mkdtemp(
path.join(tmpdir(), "openhuman-harness-cache-audit-"),
);
opts.workspace = path.join(tempWorkspace, "workspace");
await mkdir(opts.workspace, { recursive: true });
await writeAuditDefinitions(opts.workspace);
}
if (opts.spawnCore) {
if (!opts.coreUrlExplicit) {
const port = await pickFreePort();
opts.coreUrl = `http://127.0.0.1:${port}/rpc`;
}
spawned = await startCore(opts);
opts.token = spawned.token;
} else {
opts.token = await readToken(opts);
}View on GitHub (pinned to a221052e0d)
Solutions
- Add `--spawn-core` so the audit spawns a core against the temp workspace
- Or drop `--isolated-workspace` entirely to audit the workspace of the already-running core you are attaching to
Example fix
# before node scripts/debug/harness-cache-audit.mjs --isolated-workspace # after node scripts/debug/harness-cache-audit.mjs --isolated-workspace --spawn-core --keep-workspace
Defensive patterns
Strategy: validation
Validate before calling
const needSpawn = argv.includes("--isolated-workspace");
if (needSpawn && !argv.includes("--spawn-core")) {
console.error("--isolated-workspace starts a temp workspace; add --spawn-core");
process.exit(2);
} Prevention
- Treat --isolated-workspace/--spawn-core as one unit in wrappers and docs
- Wrap invocations in a make/script target that always passes both
When it happens
Trigger: Invoking `node scripts/debug/harness-cache-audit.mjs --isolated-workspace` without also passing `--spawn-core` — e.g. copied from a longer command line and trimmed, or assuming the script attaches to the desktop app's core while still isolating the workspace.
Common situations: Trying to get 'a clean workspace' against an attached core; shell history editing that drops a flag; wrapping the script in tooling that adds --isolated-workspace but not --spawn-core.
Related errors
- Failed to parse service CLI output as JSON: parsed value doe
- paths must be repo-relative, not absolute (got "${p}")
- must be an array
- ${label} must be a positive integer
- ${label} must be a positive integer
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/e4f1c075c0bdc0ab.
Report an issue: GitHub.