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

Invalid membership transaction file entry for ${teamName}

Error message

Invalid membership transaction file entry for ${teamName}

What it means

Error "Invalid membership transaction file entry for ${teamName}" thrown in Yeachan-Heo/oh-my-codex.

Source

Thrown at src/team/state.ts:928

  const expectedManifestPath = resolve(teamManifestV2Path(teamName, cwd));
  const expectedTasksDir = resolve(teamDir(teamName, cwd), 'tasks');
  const seenPaths = new Set<string>();
  let configCount = 0;
  const canonicalStateRoot = await realpath(resolveTeamStateRoot(cwd));
  const canonicalTeamRoot = await realpath(teamDir(teamName, cwd));
  if (canonicalTeamRoot !== canonicalStateRoot && !canonicalTeamRoot.startsWith(`${canonicalStateRoot}${sep}`)) {
    throw new Error(`Membership transaction team root escapes canonical state root for ${teamName}`);
  }
  const canonicalTasksDir = await realpath(resolve(teamDir(teamName, cwd), 'tasks'));
  if (!canonicalTasksDir.startsWith(`${canonicalTeamRoot}${sep}`)) {
    throw new Error(`Membership transaction tasks root escapes canonical team root for ${teamName}`);
  }

  for (const file of files) {
    if (!file || typeof file.path !== 'string'
      || (file.oldBytes !== null && typeof file.oldBytes !== 'string')
      || (file.newBytes !== null && typeof file.newBytes !== 'string')) {
      throw new Error(`Invalid membership transaction file entry for ${teamName}`);
    }
    const resolvedPath = resolve(file.path);
    if (resolvedPath !== file.path || seenPaths.has(resolvedPath)) {
      throw new Error(`Invalid membership transaction path for ${teamName}`);
    }
    seenPaths.add(resolvedPath);
    let expectedParent: string;
    if (resolvedPath === expectedConfigPath) {
      configCount += 1;
      expectedParent = canonicalTeamRoot;
    } else if (resolvedPath === expectedManifestPath) {
      expectedParent = canonicalTeamRoot;
    } else {
      if (dirname(resolvedPath) !== expectedTasksDir) {
        throw new Error(`Membership transaction path escapes expected team files for ${teamName}`);
      }
      const match = basename(resolvedPath).match(/^task-([A-Za-z0-9_-]+)\.json$/);
      if (!match || resolve(taskFilePath(teamName, match[1]!, cwd)) !== resolvedPath) {

View on GitHub (pinned to 3ad79a8a6f)

When it happens

Trigger: Thrown at src/team/state.ts:928 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/94e5e46680dbe60e. Report an issue: GitHub.