<< All versions

Skill v1.0.1

currentAutomated scan100/100
baekenough/oh-my-customcode/model-escalation

+4 new

──Details
PublishedNovember 6, 2026 at 04:54 AM
Content Hashsha256:f7e5e97332e0b3a1...
Git SHA7960acbd65a8
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 2.5 KB)
SKILL.md2.5 KBactive
SKILL.md · 69 lines · 2.5 KB

name: model-escalation description: Advisory model escalation based on task outcome tracking scope: core user-invocable: false metadata: version: "1.0.1"


Model Escalation Skill

Tracks task outcomes and advises model upgrades when failures are detected. Advisory-only — the orchestrator makes the final decision (R010).

Escalation Path

haiku → sonnet → opus

Trigger Conditions

ConditionAction
2+ recorded failures for the same agent type (any model; evaluated only for haiku/sonnet spawns)Advise escalation
3+ consecutive failures across any agent typeAdvise escalation (per spawn, not global; only when the spawn's model parameter is haiku or sonnet)
Sustained success after escalationAdvise de-escalation (opt-in: OMCUSTOM_MODEL_DEESCALATION=on)

Thresholds

Hard-coded in model-escalation-advisor.sh (not configurable via frontmatter or settings):

ConstantValueDescription
FAILURE_THRESHOLD2Failures before escalation advisory
CONSECUTIVE_THRESHOLD3Consecutive failures for the per-spawn advisory
COOLDOWN5Successes before de-escalation advisory (opt-in only)

Each distinct advisory is shown at most once per session (atomic per-key marker dir /tmp/.claude-model-advisory-shown-${PPID}.d/). De-escalation is off by default because task-outcome-recorder.sh records every subagent completion as success, so consecutive successes carry no signal.

Cost Guard

  • Advisory includes estimated cost multiplier
  • De-escalation (opt-in via OMCUSTOM_MODEL_DEESCALATION=on) suggested after sustained success at higher tier
  • Cost tracked per session via PPID-scoped temp file

Architecture

SubagentStop → task-outcome-recorder.sh (the only wiring; not PostToolUse)
Records: agent_type, model ("inherit"), outcome (always success; no failure signal, so the escalation advisory is currently unreachable)
Storage: /tmp/.claude-task-outcomes-$PPID (JSON lines, max 50)
PreToolUse (Task) → model-escalation-advisor.sh
Reads outcomes → counts failures → advises escalation via additionalContext
Advisory only — never blocks, never modifies tool input

Advisory Format

--- [Model Escalation Advisory] ---
Agent type: {agent_type}
Current model: {current_model}
Recent failures: {count}/{threshold}
⚡ Recommended: Escalate to {next_model}
Cost impact: {multiplier} per task
---
← v1.0.0All versions