Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save arikon/91c981d2ff51d1470fd87958b3e124b6 to your computer and use it in GitHub Desktop.

Select an option

Save arikon/91c981d2ff51d1470fd87958b3e124b6 to your computer and use it in GitHub Desktop.
oh-my-codex #3325: canonicalize Conductor mutation roots on macOS
From 8286b9f757065cfea9062620584c8dc3e276c4c4 Mon Sep 17 00:00:00 2001
From: Sergey Belov <peimei@ya.ru>
Date: Tue, 28 Jul 2026 00:50:59 +0200
Subject: [PATCH] fix(hook): canonicalize conductor mutation roots
---
src/scripts/codex-native-hook.ts | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/scripts/codex-native-hook.ts b/src/scripts/codex-native-hook.ts
index 9a13f337..2f48ba6c 100644
--- a/src/scripts/codex-native-hook.ts
+++ b/src/scripts/codex-native-hook.ts
@@ -74,7 +74,7 @@ import {
writeTeamPhase,
} from "../team/state.js";
import { parseTeamNoticeLedgerPrompt, reconcileTeamNoticeLedger } from "../team/notice-ledger.js";
-import { omxNotepadPath, resolveProjectMemoryPath } from "../utils/paths.js";
+import { canonicalizeComparablePath, omxNotepadPath, resolveProjectMemoryPath } from "../utils/paths.js";
import { findGitLayout } from "../utils/git-layout.js";
import {
getAuthoritativeActiveStatePaths,
@@ -17115,11 +17115,15 @@ function conductorPathnameExpansionIsAmbiguous(path: string): boolean {
function normalizeWgetMutationTargets(targets: string[], effectiveCwd: string, rootCwd: string): string[] | null {
const normalized: string[] = [];
+ const canonicalEffectiveCwd = canonicalizeComparablePath(effectiveCwd);
+ const canonicalRootCwd = canonicalizeComparablePath(rootCwd);
for (const target of targets) {
if (isUnresolvedVariableTarget(target) || /[`$]/.test(target) || conductorPathnameExpansionIsAmbiguous(target)) return null;
try {
- const absoluteTarget = isAbsolute(target) ? resolve(target) : resolve(effectiveCwd, target);
- normalized.push(relative(rootCwd, absoluteTarget).replace(/\\/g, "/") || ".");
+ const absoluteTarget = isAbsolute(target)
+ ? canonicalizeComparablePath(target)
+ : resolve(canonicalEffectiveCwd, target);
+ normalized.push(relative(canonicalRootCwd, absoluteTarget).replace(/\\/g, "/") || ".");
} catch {
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment