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

${label} not found: ${path}

Error message

${label} not found: ${path}

What it means

The worker-pane liveness checker refuses to treat a pane as a worker when it is the same pane id as the configured HUD pane. Workers and the HUD must be distinct panes; targeting the HUD pane for a worker operation (sending keys, killing) would corrupt or destroy the HUD, so this is a hard guard.

Source

Thrown at src/auth/paths.ts:71

export async function ensurePrivateDir(dir: string): Promise<void> {
  await mkdir(dir, { recursive: true, mode: AUTH_DIR_MODE });
  const info = await lstat(dir);
  if (info.isSymbolicLink()) throw new Error(`auth directory must not be a symlink: ${dir}`);
  if (!info.isDirectory()) throw new Error(`auth path is not a directory: ${dir}`);
  if (process.platform !== "win32") {
    const { chmod } = await import("fs/promises");
    await chmod(dir, AUTH_DIR_MODE).catch(() => undefined);
  }
}

export async function assertReadableFile(path: string, label: string): Promise<void> {
  try {
    const info = await stat(path);
    if (!info.isFile()) throw new Error(`${label} is not a file: ${path}`);
  } catch (err) {
    if (err && typeof err === "object" && "code" in err && err.code === "ENOENT") {
      throw new Error(`${label} not found: ${path}`);
    }
    throw err;
  }
}

export async function assertNoSymlink(path: string, label: string): Promise<void> {
  try {
    const { lstat } = await import("fs/promises");
    const info = await lstat(path);
    if (info.isSymbolicLink()) throw new Error(`${label} must not be a symlink: ${path}`);
  } catch (err) {
    if (err && typeof err === "object" && "code" in err && err.code === "ENOENT") return;
    throw err;
  }
}

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Check how workerPaneId and hudPaneId were derived — they must come from different split-pane creations
  2. Re-create the team session so panes are allocated and recorded correctly
  3. If persisting pane ids, invalidate them on tmux server restart
  4. Add an assertion at session setup that worker and HUD pane ids differ

Example fix

// before
const workerPaneId = hudPaneId; // both from same capture

// after
assertNotEqual(workerPaneId, hudPaneId, 'worker pane must differ from HUD pane');
Defensive patterns

Strategy: validation

Validate before calling

if (workerPaneId === hudPaneId?.trim()) throw new Error('wiring bug: worker pane equals HUD pane');

Try / catch

catch (err) { if (/is HUD target/.test(err.message)) { /* fix pane id capture and rebuild session */ } }

Prevention

When it happens

Trigger: Calling worker-pane operations (e.g. resolveWorkerPaneTargetSync / submit paths) where workerPaneId === hudPaneId — misconfiguration, or pane-id bookkeeping that assigned the same pane to both roles (often after pane id reuse or a wrong id captured at session creation).

Common situations: Passing the same pane id for both worker and HUD options, stale persisted pane ids after tmux restart colliding, or splitting logic that recorded the HUD pane as a worker.

Related errors


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