# Planning Goal Error Handling

> Sub-skill of planning-goal: Error Handling.

- Skill: `vamseeachanta/planning-goal-error-handling` (Agent Skill)
- Install (CLI): `npx skillmds@latest add vamseeachanta/planning-goal-error-handling`
- Raw SKILL.md: https://api.skillmd.com/api/skills/vamseeachanta/planning-goal-error-handling/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: vamseeachanta (https://skillmd.com/u/vamseeachanta)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/vamseeachanta/planning-goal-error-handling

---


# Error Handling

## Error Handling


### Plan Generation Failures


```typescript
// No valid path exists
if (!plan) {
  // Analyze which preconditions cannot be satisfied
  const unsatisfiable = findUnsatisfiablePreconditions(goalState);
  console.error(`Cannot reach goal: missing ${unsatisfiable}`);

  // Suggest partial goals that ARE achievable
  const partialGoals = suggestAchievableSubsets(goalState);
}
```

### Execution Failures


```typescript
// Action failed during execution
if (actionResult.failed) {
  // Check if alternative action available
  if (action.fallback) {
    await executeAction(action.fallback);
  } else {
    // Replan from current state
    const newPlan = await replan(currentState, goalState);
  }
}
```

