{"record":{"id":"7ef54dde0dbaae5d","repo":"Yeachan-Heo/oh-my-codex","slug":"approved-execution-binding-ambiguous-approvedexe","errorCode":null,"errorMessage":"approved_execution_binding_ambiguous:${approvedExecutionState.binding.prd_path}:${approvedExecutionState.binding.task}","messagePattern":"approved_execution_binding_ambiguous:(.+?):(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/team/runtime.ts","lineNumber":5636,"sourceCode":"/**\n * Resume monitoring an existing team.\n */\nexport async function resumeTeam(teamName: string, cwd: string): Promise<TeamRuntime | null> {\n  const sanitized = resolveTeamNameForCurrentContext(teamName, cwd);\n  const config = await readTeamConfig(sanitized, cwd);\n  if (!config) return null;\n  config.lifecycle_profile = 'default';\n  const leaderCwd = config.leader_cwd ?? cwd;\n  const approvedExecutionState = await resolvePersistedApprovedTeamExecutionContinuityState(\n    sanitized,\n    leaderCwd,\n    config.team_state_root ?? resolveCanonicalTeamStateRoot(leaderCwd),\n  );\n  if (approvedExecutionState.status === 'malformed') {\n    throw new Error(`approved_execution_binding_malformed:${sanitized}`);\n  }\n  if (approvedExecutionState.status === 'ambiguous') {\n    throw new Error(\n      `approved_execution_binding_ambiguous:${approvedExecutionState.binding.prd_path}:${approvedExecutionState.binding.task}`,\n    );\n  }\n  if (approvedExecutionState.status === 'stale') {\n    throw new Error(\n      `approved_execution_binding_stale:${approvedExecutionState.binding.prd_path}:${approvedExecutionState.binding.task}`,\n    );\n  }\n  if (config.worker_launch_mode === 'prompt') {\n    const handleTeamConfig = { ...config, name: sanitized };\n    const hasLivePromptWorker = config.workers.some((worker) => isPromptWorkerAlive(handleTeamConfig, worker));\n    if (!hasLivePromptWorker) return null;\n\n    const missingHandles = config.workers\n      .filter((worker) => {\n        if (!Number.isFinite(worker.pid) || (worker.pid ?? 0) <= 0) return false;\n        return probePidLiveness(worker.pid as number) !== 'gone';\n      })","sourceCodeStart":5618,"sourceCodeEnd":5654,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/team/runtime.ts#L5618-L5654","documentation":"Thrown when the persisted approved execution binding is 'ambiguous' — multiple candidate PRD/task bindings match and the system cannot determine which approved execution to continue.","triggerScenarios":"Resuming a team whose approved-execution state contains more than one plausible binding for prd_path/task; message includes the offending prd_path and task.","commonSituations":"Approving multiple executions for overlapping PRDs, or state left over from a previous task with the same path/task identifiers.","solutions":["Disambiguate by removing the stale binding from team state and keeping only the intended one","Re-approve a single execution before resuming","Check for duplicate PRD paths in the team workspace"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const st = await resolvePersistedApprovedTeamExecutionContinuityState(...); if (st.status !== 'ok') handleNonOk(st);","typeGuard":"(s): s is { status: 'ambiguous' } => s.status === 'ambiguous'","tryCatchPattern":null,"preventionTips":["Keep at most one approved execution binding per PRD/task","Clean bindings when re-approving"],"tags":["team","state","ambiguity","binding"],"backgroundTag":"ambiguous-state-resolution","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}