Yeachan-Heo/oh-my-codex · error · Error
approved_execution_binding_ambiguous:${approvedExecutionStat
Error message
approved_execution_binding_ambiguous:${approvedExecutionState.binding.prd_path}:${approvedExecutionState.binding.task} What it means
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.
Source
Thrown at src/team/runtime.ts:5636
/**
* Resume monitoring an existing team.
*/
export async function resumeTeam(teamName: string, cwd: string): Promise<TeamRuntime | null> {
const sanitized = resolveTeamNameForCurrentContext(teamName, cwd);
const config = await readTeamConfig(sanitized, cwd);
if (!config) return null;
config.lifecycle_profile = 'default';
const leaderCwd = config.leader_cwd ?? cwd;
const approvedExecutionState = await resolvePersistedApprovedTeamExecutionContinuityState(
sanitized,
leaderCwd,
config.team_state_root ?? resolveCanonicalTeamStateRoot(leaderCwd),
);
if (approvedExecutionState.status === 'malformed') {
throw new Error(`approved_execution_binding_malformed:${sanitized}`);
}
if (approvedExecutionState.status === 'ambiguous') {
throw new Error(
`approved_execution_binding_ambiguous:${approvedExecutionState.binding.prd_path}:${approvedExecutionState.binding.task}`,
);
}
if (approvedExecutionState.status === 'stale') {
throw new Error(
`approved_execution_binding_stale:${approvedExecutionState.binding.prd_path}:${approvedExecutionState.binding.task}`,
);
}
if (config.worker_launch_mode === 'prompt') {
const handleTeamConfig = { ...config, name: sanitized };
const hasLivePromptWorker = config.workers.some((worker) => isPromptWorkerAlive(handleTeamConfig, worker));
if (!hasLivePromptWorker) return null;
const missingHandles = config.workers
.filter((worker) => {
if (!Number.isFinite(worker.pid) || (worker.pid ?? 0) <= 0) return false;
return probePidLiveness(worker.pid as number) !== 'gone';
})View on GitHub (pinned to 3ad79a8a6f)
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
Defensive patterns
Strategy: validation
Validate before calling
const st = await resolvePersistedApprovedTeamExecutionContinuityState(...); if (st.status !== 'ok') handleNonOk(st);
Type guard
(s): s is { status: 'ambiguous' } => s.status === 'ambiguous' Prevention
- Keep at most one approved execution binding per PRD/task
- Clean bindings when re-approving
When it happens
Trigger: 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.
Common situations: Approving multiple executions for overlapping PRDs, or state left over from a previous task with the same path/task identifiers.
Related errors
- approved_execution_binding_malformed:${sanitized}
- Conflicting setup Team mode flags: ${source} selects ${next}
- Invalid setup Team mode: ${next}. Expected one of: enabled,
- Missing setup Team mode value after --team-mode. Expected on
- bound session retained close failed: ${closeEvidence.error?.
AI-assisted analysis of Yeachan-Heo/oh-my-codex@3ad79a8a6f (2026-08-27).
Data as JSON: /api/errors/7ef54dde0dbaae5d.
Report an issue: GitHub.