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

Missing ${field}.

Error message

Missing ${field}.

What it means

The pinned worker-pane target resolver (createPinnedWorkerPaneTargetResolverSync) refuses to return a target when the worker pane id equals the canonical HUD pane id. Even though both ids are trusted config, double-booking one pane as both worker and HUD would let worker I/O hit the HUD pane, so it throws immediately at resolve time.

Source

Thrown at src/autoresearch/goal.ts:100

  summary?: string;
  artifactPath?: string;
  now?: Date;
}

export interface CompleteAutoresearchGoalOptions {
  codexGoal?: unknown;
  now?: Date;
}

export class AutoresearchGoalError extends Error {}

function iso(now = new Date()): string {
  return now.toISOString();
}

function requireText(value: string, field: string): string {
  const trimmed = value.trim();
  if (!trimmed) throw new AutoresearchGoalError(`Missing ${field}.`);
  return trimmed;
}

function repoRelative(cwd: string, path: string): string {
  return relative(cwd, path).split('\\').join('/');
}

export function autoresearchGoalDir(cwd: string, slug: string): string {
  return join(cwd, AUTORESEARCH_GOAL_ROOT, slug);
}

export function autoresearchGoalMissionPath(cwd: string, slug: string): string {
  return join(autoresearchGoalDir(cwd, slug), AUTORESEARCH_GOAL_MISSION);
}

export function autoresearchGoalRubricPath(cwd: string, slug: string): string {
  return join(autoresearchGoalDir(cwd, slug), AUTORESEARCH_GOAL_RUBRIC);
}

View on GitHub (pinned to 3ad79a8a6f)

Solutions

  1. Print both ids at setup and assert they differ before creating the resolver
  2. Re-derive each id from its own split-pane creation result
  3. Avoid hand-copying pane ids; always capture programmatically at creation
  4. Add a startup validation step that fails fast on workerPaneId === hudPaneId

Example fix

// before
const resolver = createPinnedWorkerPaneTargetResolverSync(session, hudPaneId, hudPaneId /* bug */, pid, owner);

// after
if (workerPaneId === hudPaneId.trim()) throw new Error('bad wiring: worker pane equals HUD pane');
const resolver = createPinnedWorkerPaneTargetResolverSync(session, workerPaneId, hudPaneId, pid, owner);
Defensive patterns

Strategy: validation

Validate before calling

if (workerPaneId === (hudPaneId ?? '').trim()) throw new Error('worker pane must differ from HUD pane');

Try / catch

catch (err) { if (/is HUD target/.test(err.message)) { /* wiring bug: re-derive both ids and rebuild resolver */ } }

Prevention

When it happens

Trigger: Creating/using a pinned worker resolver where workerPaneId === hudPaneId.trim() — a wiring bug where the HUD pane id was captured as the worker pane id (common when copying ids by hand or when a split returned the wrong pane).

Common situations: Hand-configured pane ids, copy-paste from `tmux list-panes`, or split-pane bookkeeping that stored the HUD pane id in the worker field after a layout change.

Related errors


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