can1357/oh-my-pi · error · Error

--resume: no recorded launch config for ${jobName} (missing

Error message

--resume: no recorded launch config for ${jobName} (missing both _bench/${jobName}/runner-config.json and ${jobName}/manager.json)

What it means

Resume requires a recorded launch config from one of two sources: the saved _bench/<jobName>/runner-config.json, or <jobDir>/manager.json (from which args are re-derived). If both are absent/unreadable, there is nothing to reconstruct the run from, so the error names both candidate paths explicitly.

Source

Thrown at packages/metaharness/src/runner.ts:414

	const jobConfig = readJson(path.join(jobDir, "config.json")) as { environment?: { type?: string } } | null;
	if (!jobConfig) throw new Error(`--resume: ${jobDir} has no harbor config.json (not a harbor job dir)`);

	let cfg: Config | null = null;
	const saved = readJson(path.join(jobsDir, "_bench", jobName, "runner-config.json"));
	if (saved && typeof saved === "object") {
		cfg = { ...defaultConfig(), ...(saved as Partial<Config>) };
	} else {
		const manager = readJson(path.join(jobDir, "manager.json")) as ManagerRecord | null;
		if (manager?.config) {
			if (manager.benchmark && manager.benchmark !== "harbor") {
				throw new Error(`--resume supports only harbor runs (${jobName} is ${manager.benchmark})`);
			}
			const dataset = manager.config.dataset ?? manager.dataset ?? "terminal-bench@2.0";
			cfg = parseArgs(harborRunnerArgs(manager.config, { jobsDir, jobName, dataset }));
		}
	}
	if (!cfg) {
		throw new Error(
			`--resume: no recorded launch config for ${jobName} ` +
				`(missing both _bench/${jobName}/runner-config.json and ${jobName}/manager.json)`,
		);
	}
	cfg.jobsDir = jobsDir;
	cfg.jobName = jobName;
	cfg.resume = spec;
	// The recorded backend wins over any reconstruction-time preference
	// (e.g. apple-container auto-detection added after the original run).
	const recorded = jobConfig.environment?.type;
	if ((recorded === "docker" || recorded === "apple-container") && cfg.envType !== recorded) {
		if (recorded === "apple-container" && cfg.gatewayUrl === DOCKER_GATEWAY_URL) cfg.gatewayUrl = VMNET_GATEWAY_URL;
		else if (recorded === "docker" && cfg.gatewayUrl === VMNET_GATEWAY_URL) cfg.gatewayUrl = DOCKER_GATEWAY_URL;
		cfg.envType = recorded;
	}
	// Knobs owned by the resume invocation, not the original launch.
	cfg.filterErrorTypes = cli.filterErrorTypes;
	cfg.passthrough = cli.passthrough;

View on GitHub (pinned to 9690622007)

Solutions

  1. Check both files exist: `cat <jobsDir>/_bench/<job>/runner-config.json` and `<jobsDir>/<job>/manager.json`.
  2. Re-run the job from scratch instead of resuming — there is no launch config to recover.
  3. Restore the missing file from backup or re-copy the complete job dir including _bench/.
  4. Upgrade: if older runner versions didn't persist these, re-run once with a current version so future resumes work.

Example fix

// before
runner --resume jobA   # jobA/config.json exists but no _bench/jobA/runner-config.json, no jobA/manager.json
// after
runner --resume jobA   # after restoring _bench/jobA/runner-config.json from backup
Defensive patterns

Strategy: validation

Validate before calling

import * as fs from "node:fs";
const hasSaved = fs.existsSync(path.join(jobsDir, "_bench", jobName, "runner-config.json"));
const hasManager = fs.existsSync(path.join(jobDir, "manager.json"));
if (!hasSaved && !hasManager) {
  throw new Error(`no launch config to resume from for '${jobName}' — rerun from scratch`);
}

Type guard

function isResumable(jobsDir: string, jobName: string): boolean {
  return fs.existsSync(path.join(jobsDir, "_bench", jobName, "runner-config.json")) ||
         fs.existsSync(path.join(jobsDir, jobName, "manager.json"));
}

Try / catch

try {
  await resumeJob(name);
} catch (e) {
  if (e instanceof Error && e.message.includes("no recorded launch config")) {
    console.error("No runner-config.json or manager.json found — the job must be re-run, not resumed.");
  } else throw e;
}

Prevention

When it happens

Trigger: Job dir exists and has config.json, but the _bench metadata dir was cleaned up AND manager.json is missing; resuming a job created by an older runner version that wrote neither file; manually copying a job dir without its metadata.

Common situations: Jobs dirs pruned by a cleanup script that keeps config.json but drops _bench; sharing a single job dir between machines; interrupted first launch that crashed before writing any launch record.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/aec0c65667b2173a. Report an issue: GitHub.