Yeachan-Heo/oh-my-codex · error · Error

Unknown adapt target: ${target}. Supported targets: ${suppor

Error message

Unknown adapt target: ${target}. Supported targets: ${supportedAdaptTargets().join(", ")}

What it means

Thrown when `omx adapt <target>` (help/listing mode) is called with a target that getAdaptTargetDescriptor does not recognize. The message lists all supported adapt targets so the user can self-correct. Only registered adapt targets (e.g. known CI/editor integrations) are accepted.

Source

Thrown at src/cli/adapt.ts:135

}

export async function adaptCommand(
	args: string[],
	deps: AdaptCommandDependencies = {},
): Promise<void> {
	const cwd = deps.cwd ?? process.cwd();
	const stdout = deps.stdout ?? ((line: string) => console.log(line));
	const { target, subcommand, json, write, wantsHelp } = parseArgs(args);

	if (!target || wantsHelp) {
		if (!target) {
			stdout(HELP);
			return;
		}

		const descriptor = getAdaptTargetDescriptor(target);
		if (!descriptor) {
			throw new Error(
				`Unknown adapt target: ${target}. Supported targets: ${supportedAdaptTargets().join(", ")}`,
			);
		}
		stdout(targetHelp(descriptor.target));
		return;
	}

	const descriptor = getAdaptTargetDescriptor(target);
	if (!descriptor) {
		throw new Error(
			`Unknown adapt target: ${target}. Supported targets: ${supportedAdaptTargets().join(", ")}`,
		);
	}

	if (!subcommand) {
		stdout(targetHelp(descriptor.target));
		return;
	}

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Use one of the targets printed in the error message
  2. Run `omx adapt` with no arguments to list targets
  3. Upgrade omx if you expect a target that the current build does not know

Example fix

# before
omx adapt gihub

# after
omx adapt github
Defensive patterns

Strategy: validation

Validate before calling

import { supportedAdaptTargets } from './adapt';
if (!supportedAdaptTargets().includes(target)) {
  console.error(`unsupported target; choose from: ${supportedAdaptTargets().join(', ')}`);
  process.exit(2);
}

Type guard

const isAdaptTarget = (t: string): boolean => supportedAdaptTargets().includes(t);

Prevention

When it happens

Trigger: Running `omx adapt <name>` where <name> is not in supportedAdaptTargets(), e.g. a typo like `omx adapt gihub`, or a target registered only in a newer/older version.

Common situations: Typos in target names, targets removed/renamed between versions, or custom targets that were never registered via the adapt target registry.

Related errors


AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27). Data as JSON: /api/errors/64e8e63f38761b80. Report an issue: GitHub.