Yeachan-Heo/oh-my-codex · error

Native hook transaction precondition changed for ancestor ${

Error message

Native hook transaction precondition changed for ancestor ${expected.path}; refusing to mutate a stale topology.

What it means

Error "Native hook transaction precondition changed for ancestor ${expected.path}; refusing to mutate a stale topology." thrown in Yeachan-Heo/oh-my-codex.

Source

Thrown at src/cli/setup.ts:849

	);
	return {
		controlledRoot,
		ancestorPaths,
		snapshots: await captureNativeHookTransactionAncestorSnapshots(ancestorPaths),
	};
}

async function assertNativeHookTransactionAncestorPrecondition(
	precondition: NativeHookTransactionAncestorPrecondition,
): Promise<void> {
	const actual = await captureNativeHookTransactionAncestorSnapshots(
		precondition.ancestorPaths,
	);
	for (let index = 0; index < precondition.snapshots.length; index += 1) {
		const expected = precondition.snapshots[index]!;
		const current = actual[index]!;
		if (!nativeHookTransactionAncestorTopologyEqual(current.topology, expected.topology)) {
			throw new Error(
				`Native hook transaction precondition changed for ancestor ${expected.path}; refusing to mutate a stale topology.`,
			);
		}
	}
}

async function refreshNativeHookTransactionAncestorPrecondition(
	precondition: NativeHookTransactionAncestorPrecondition,
	artifactPath: string,
): Promise<void> {
	const allowedCreatedPaths = new Set(
		nativeHookTransactionArtifactAncestorPaths(precondition.controlledRoot, [artifactPath]),
	);
	const actual = await captureNativeHookTransactionAncestorSnapshots(
		precondition.ancestorPaths,
	);
	for (let index = 0; index < precondition.snapshots.length; index += 1) {
		const expected = precondition.snapshots[index]!;

View on GitHub (pinned to 3ad79a8a6f)

When it happens

Trigger: Thrown at src/cli/setup.ts:849 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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