can1357/oh-my-pi · error · Error
--resume supports only harbor runs (${jobName} is ${manager.
Error message
--resume supports only harbor runs (${jobName} is ${manager.benchmark}) What it means
The resume path only supports harbor benchmark runs. When reconstructing config from <jobDir>/manager.json, if the recorded benchmark field exists and is anything other than "harbor", resolveResumeConfig throws, since harborRunnerArgs would build an incompatible config for the recorded run type.
Source
Thrown at packages/metaharness/src/runner.ts:407
* whose reconstructed config differs from the recorded one.
*/
export function resolveResumeConfig(cli: Config): Config {
const spec = cli.resume as string;
const jobsDir = spec.includes(path.sep) ? path.dirname(path.resolve(spec)) : cli.jobsDir;
const jobName = path.basename(spec);
const jobDir = path.join(jobsDir, jobName);
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) {View on GitHub (pinned to 9690622007)
Solutions
- Confirm the job is a harbor run: check `benchmark` in <jobDir>/manager.json.
- Use the correct runner/tool for that benchmark type instead of the harbor resume path.
- Pick the right job name from `ls <jobsDir>` — you may be resuming a sibling job from a different benchmark.
- Delete/archieve stale non-harbor job dirs from the shared jobs dir to avoid picking the wrong name.
Example fix
// before runner --resume swejob1 # manager.json says benchmark: "swe-bench" // after runner --resume harborjob7 # a job whose manager.json benchmark is "harbor"
Defensive patterns
Strategy: validation
Validate before calling
const manager = JSON.parse(fs.readFileSync(path.join(jobDir, "manager.json"), "utf8"));
if (manager.benchmark && manager.benchmark !== "harbor") {
throw new Error(`job '${jobName}' is a '${manager.benchmark}' run; use that tool's resume path`);
} Type guard
function isHarborJob(m: { benchmark?: string } | null): boolean {
return !m?.benchmark || m.benchmark === "harbor";
} Try / catch
try {
await resumeJob(name);
} catch (e) {
if (e instanceof Error && e.message.includes("supports only harbor runs")) {
console.error("Pick a harbor job, or use the original benchmark's runner for this one.");
} else throw e;
} Prevention
- Keep different benchmarks in separate jobs directories to avoid name mixups.
- Check manager.json's benchmark field before choosing a resume command.
- Prefix job names with the benchmark type in shared dirs.
When it happens
Trigger: `runner --resume <name>` where the job was created by a different benchmark manager (e.g. a swe-bench or other benchmark recorded in manager.json), so manager.benchmark is set to a non-harbor value.
Common situations: Pointing --resume at a job dir produced by another tool that shares the jobs directory layout; an old job created before the benchmark field existed elsewhere; copy-pasting the wrong job name from a shared jobs dir.
Related errors
- --resume: ${jobDir} has no harbor config.json (not a harbor
- Unsupported language '{value}'. Supported: {}
- Unable to infer language from file extension: {}. Specify `l
- Invalid pattern: {err}
- Failed to load tree-sitter language: {err}
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/ebfe651d82abf306.
Report an issue: GitHub.