baekenough/oh-my-customcode/model-escalation

Claude Code and agent skill by baekenough/oh-my-customcode

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Advisory model escalation based on task outcome tracking

Install

npx vskill@latest install baekenough/oh-my-customcode/model-escalation

SKILL.md

The same SKILL.md was published earlier as baekenough/oh-my-customcode/model-escalation.

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 consecutive successes (ledger rows carry model inherit, so "after escalation" cannot be distinguished)Advise 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, as wired (SubagentStop carries no failure signal), the ledger writer (task-outcome-recorder.sh) records success only, so consecutive successes carry no signal. The writer still contains an outcome="failure" branch (is_error == true) that this wiring never reaches.

Cost Guard

  • Advisory includes estimated cost multiplier
  • De-escalation (opt-in via OMCUSTOM_MODEL_DEESCALATION=on) suggested after COOLDOWN consecutive success rows while the spawn model parameter is opus or sonnet (model-escalation-advisor.sh de-escalation block: the outer gate only excludes haiku, inherit and empty, but its case yields a lower model solely for opus→sonnet and sonnet→haiku, so any other value such as fable passes the gate and still gets no advisory)
  • The cost multiplier in the advisory is derived from the model tier by model-escalation-advisor.sh; ledger rows (PPID-scoped temp file) have no cost field

Architecture

SubagentStop → task-outcome-recorder.sh (the only wiring; not PostToolUse)
Records: agent_type, model ("inherit"), outcome (as wired, the ledger writer records success only, so the escalation advisory is 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}
⚡ Recommended: Escalate to {next_model}
Cost impact: {multiplier} per task
Reason: {reason}
------------------------------------

Probe Record (#1912)

Measured on CC 2.1.318 with claude -p and a haiku model:

  • PostToolUseFailure fired for a spawn error (unknown subagent_type) and for a subagent terminated by an API error after SubagentStart.
  • It did not fire when the subagent exceeded its maxTurns (two runs, both maxTurns=1: foreground, PostToolUse reported status=completed; default run, PostToolUse reported status=async_launched).
  • Not observed: a failure after several successful turns, and interactive sessions.
  • Nothing writes these failures to the ledger (the proposal to add a failure-row writer was closed in #1912 without implementation).

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/baekenough/oh-my-customcode/model-escalation/badge)](https://verified-skill.com/skills/baekenough/oh-my-customcode/model-escalation)

Something wrong with this skill or its page? Tell us.