{"record":{"id":"33bcc41f96cc2c5a","repo":"Yeachan-Heo/oh-my-codex","slug":"label-not-found-path","errorCode":null,"errorMessage":"${label} not found: ${path}","messagePattern":"(.+?) not found: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/auth/paths.ts","lineNumber":71,"sourceCode":"\nexport async function ensurePrivateDir(dir: string): Promise<void> {\n  await mkdir(dir, { recursive: true, mode: AUTH_DIR_MODE });\n  const info = await lstat(dir);\n  if (info.isSymbolicLink()) throw new Error(`auth directory must not be a symlink: ${dir}`);\n  if (!info.isDirectory()) throw new Error(`auth path is not a directory: ${dir}`);\n  if (process.platform !== \"win32\") {\n    const { chmod } = await import(\"fs/promises\");\n    await chmod(dir, AUTH_DIR_MODE).catch(() => undefined);\n  }\n}\n\nexport async function assertReadableFile(path: string, label: string): Promise<void> {\n  try {\n    const info = await stat(path);\n    if (!info.isFile()) throw new Error(`${label} is not a file: ${path}`);\n  } catch (err) {\n    if (err && typeof err === \"object\" && \"code\" in err && err.code === \"ENOENT\") {\n      throw new Error(`${label} not found: ${path}`);\n    }\n    throw err;\n  }\n}\n\nexport async function assertNoSymlink(path: string, label: string): Promise<void> {\n  try {\n    const { lstat } = await import(\"fs/promises\");\n    const info = await lstat(path);\n    if (info.isSymbolicLink()) throw new Error(`${label} must not be a symlink: ${path}`);\n  } catch (err) {\n    if (err && typeof err === \"object\" && \"code\" in err && err.code === \"ENOENT\") return;\n    throw err;\n  }\n}\n","sourceCodeStart":53,"sourceCodeEnd":87,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/auth/paths.ts#L53-L87","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Check how workerPaneId and hudPaneId were derived — they must come from different split-pane creations","Re-create the team session so panes are allocated and recorded correctly","If persisting pane ids, invalidate them on tmux server restart","Add an assertion at session setup that worker and HUD pane ids differ"],"exampleFix":"// before\nconst workerPaneId = hudPaneId; // both from same capture\n\n// after\nassertNotEqual(workerPaneId, hudPaneId, 'worker pane must differ from HUD pane');","handlingStrategy":"validation","validationCode":"if (workerPaneId === hudPaneId?.trim()) throw new Error('wiring bug: worker pane equals HUD pane');","typeGuard":null,"tryCatchPattern":"catch (err) { if (/is HUD target/.test(err.message)) { /* fix pane id capture and rebuild session */ } }","preventionTips":["Assert worker and HUD pane ids differ at setup","Capture each id from its own split-pane creation","Invalidate persisted ids on tmux restart"],"tags":["tmux","configuration","hud","pane-lifecycle"],"backgroundTag":"misconfigured-pane-target","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}