Skip to content

Orchestrator skill improvements: model pinning, billing-aware delegation, and a haiku Explore override#16

Merged
rlorenzo merged 7 commits into
mainfrom
claude/orchestrator-skill-improvements-24wxw9
Jul 24, 2026
Merged

Orchestrator skill improvements: model pinning, billing-aware delegation, and a haiku Explore override#16
rlorenzo merged 7 commits into
mainfrom
claude/orchestrator-skill-improvements-24wxw9

Conversation

@rlorenzo

@rlorenzo rlorenzo commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

Improvements to the efficient-orchestration skill grounded in the official Claude Code sub-agents docs and recent community measurements, plus a new Claude Code Explore agent override and a setup idempotency fix found while testing.

Skill updates (all four harness copies, regenerated via tools/generate)

  • Pin a model alias on every spawn. Since Claude Code v2.1.198 the built-in Explore/Plan/general-purpose subagents inherit the main-session model (Explore is Opus-capped on the Claude API), so un-pinned background searches bill at the orchestrator's tier. Prefer aliases (haiku/sonnet/opus) over full model IDs, and use per-agent effort: low for recon and mechanical work.
  • Billing-aware delegation. On pay-per-token APIs cheap tiers cut real dollars; on subscriptions most session cost is context reprocessing, and subagents rebuild context that flows back into yours — the durable wins there are quota-bucket arbitrage (the Sonnet-only weekly bucket), parallelism, and a lean main context.
  • Two-strike escalation. Start at the cheapest plausible tier; after two failures escalate one tier or take the work back — never a third retry at the same tier.
  • Fresh-context verification. Close non-trivial work with a verifier that only refutes, never fixes.
  • New guardrails. Don't implement slices workers own; route security-sensitive work below the frontier tier (classifier refusal risk); enforce read-only roles via tool allowlists, not prompt text.

New: Claude Code Explore agent override

  • .claude/agents/Explore.mdmodel: haiku, effort: low, read-only tools. A user-level agent named Explore is the documented way to shadow the built-in and undo the v2.1.198 inheritance change for spontaneous searches.
  • setup gains a Claude-only install target: .claude/agents/~/.claude/agents/, reusing the existing install_commands flow (marker, prompts, idempotent updates, stale pruning).
  • README documents the agent, the inheritance gotcha, and the CLAUDE.md-loading trade-off.

Fix: setup false "Updated" on every run

is_up_to_date expected a single newline before the source marker while the installer appends a blank line, so every re-run reported all managed files as "Updated" and rewrote them. The comparison now reproduces the exact bytes the install path writes.

Testing

  • shellcheck -x setup clean; markdownlint-cli2 clean; tools/generate --check in sync; all 46 bats tests pass.
  • End-to-end sandboxed ./setup run (stubbed claude/gh, throwaway $HOME): fresh install → idempotent re-run shows "up to date" → hand-edited file shows "Updated" once → "up to date" again.

🤖 Generated with Claude Code

https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk

claude added 4 commits July 24, 2026 15:19
… verifier guidance

Grounded in Claude Code docs (sub-agents) and recent community findings:

- Pin the model alias on every spawn: since Claude Code v2.1.198 the
  built-in Explore/Plan/general-purpose subagents inherit the
  main-session model (Explore Opus-capped on the Claude API), so
  un-pinned background searches bill at the orchestrator's tier; a
  user-level 'Explore' agent with 'model: haiku' shadows the built-in.
- Prefer model aliases over pinned full IDs; drop per-agent reasoning
  effort to low for cheap-tier recon and mechanical work.
- Distinguish what delegation buys per billing model: per-token savings
  on the API vs. quota-bucket arbitrage on subscriptions, where context
  reprocessing dominates and delegation can raise total tokens.
- Close non-trivial work with a fresh-context verifier that only
  refutes, never fixes; add guardrails against duplicating workers'
  slices and against routing security work to frontier classifiers.

Applied to all four harness copies and the README summary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk
is_up_to_date built its expected content with a single newline before
the marker, but the installer appends the marker with a leading blank
line. Every re-run therefore reported managed files as 'Updated' and
rewrote them even when current. Build the expected bytes by reproducing
the exact install path (cp + marker append) instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk
…uidance

- Start delegations at the cheapest plausible tier; after two failed
  attempts, escalate one tier or take the work back — never a third
  retry at the same tier.
- Enforce read-only subagent roles via per-agent tool allowlists where
  the harness supports them, rather than prompt text alone.

Generated skill copies regenerated with tools/generate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk
Since Claude Code v2.1.198 the built-in Explore subagent inherits the
main-session model (Opus-capped on the Claude API), so spontaneous
background searches bill at the daily-driver tier. A user-level agent
named Explore is the documented override; this one pins exploration to
haiku at effort low with read-only tools.

- Add .claude/agents/Explore.md
- Teach setup to install .claude/agents/ to ~/.claude/agents/ for
  Claude Code (same marker/idempotency/prune flow as commands)
- Document the agent, the inheritance gotcha, and the CLAUDE.md-loading
  trade-off in the README

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk
@rlorenzo rlorenzo changed the title feat(orchestration): add model-pinning, billing-aware delegation, and verifier guidance Orchestrator skill improvements: model pinning, billing-aware delegation, and a haiku Explore override Jul 24, 2026
@greptile-apps

greptile-apps Bot commented Jul 24, 2026

Copy link
Copy Markdown

Greptile Summary

Updates the orchestration guidance across supported harnesses, adds a low-effort Haiku Explore override for Claude Code, and improves setup installation idempotency.

  • Scopes stable model-alias guidance to harnesses that provide aliases.
  • Adds billing-aware delegation, escalation, verification, and tool-allowlist guidance.
  • Installs and documents the Claude-specific Explore agent override.
  • Aligns setup’s comparison bytes with its generated output.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.claude/commands/efficient-orchestration.md Revises the canonical orchestration guidance and correctly scopes Claude model aliases as a harness-specific example.
.codex/skills/efficient-orchestration/SKILL.md Regenerates the Codex skill with conditional alias guidance, resolving the previously reported cross-harness issue.
.claude/agents/Explore.md Adds a read-only Explore override pinned to Haiku with low effort.
setup Adds installation support for Claude agents and corrects managed-file byte comparison for idempotent reruns.
README.md Documents the Explore override, installation behavior, model inheritance, and context-loading trade-off.

Reviews (2): Last reviewed commit: "refactor(orchestration): frame all Claud..." | Re-trigger Greptile

Comment thread .codex/skills/efficient-orchestration/SKILL.md Outdated
claude added 3 commits July 24, 2026 16:29
1363 -> 898 words. Merge the overlapping Pattern / Handoff packets /
Subagent stop conditions sections into one 'Run it' list, deduplicate
the tier-matching rule, fold the verifier and vetting guidance together,
and tighten the usage-limit and pause/resume prose. Every directive from
the longer version is retained.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk
…eneric

The skill body is generated verbatim into all four harness copies, so
the Claude Code v2.1.198 reference read as a harness-specific
instruction in the Codex/Copilot/Antigravity skills. Rephrase it as the
generic principle (built-ins may inherit your main-session model) with
Claude Code as the example, and drop the version number from the
runtime prompt — it stays documented in the README, where the
Claude-only Explore agent is described.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk
…eneric principles

The skill body ships verbatim to Codex/Copilot/Antigravity, so
Claude-specific mechanics must read as examples, not instructions:

- Tier ladder: mark the Claude ordering as an example and restore the
  'check a models command or settings panel' pointer for other harnesses.
- Model pinning: 'pin an explicit model' is the universal rule; alias
  preference applies only where the harness has aliases (Claude does).
- Usage checks: restore the generic 'usage/status command if one exists'
  fallback between ccusage and rate-limit-as-cap.

Other skills audited: no Claude-specific references outside
efficient-orchestration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk

Copy link
Copy Markdown
Owner Author

@greptile-apps review

The earlier alias-portability finding was addressed in 45fc19d; please re-review the latest commit.


Generated by Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the efficient-orchestration skill guidance across all harness copies, adds a Claude Code user-level Explore agent override to prevent unintended high-tier billing for background searches, and fixes setup idempotency so managed files don’t get rewritten (and reported as “Updated”) on every run.

Changes:

  • Fix setup’s managed-file comparison to match the installer’s exact “copy + blank line + marker” bytes, restoring true idempotency.
  • Add installation support for Claude Code agents (.claude/agents/~/.claude/agents/) and introduce a read-only Explore override pinned to haiku / effort: low.
  • Refresh the efficient-orchestration docs across Claude/Codex/Copilot/Antigravity variants and document the new agent behavior in the README.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
setup Fixes marker comparison to prevent perpetual rewrites; adds installation of .claude/agents into ~/.claude/agents.
README.md Documents Claude Code agents support, the Explore override, and updates uninstall guidance.
.claude/agents/Explore.md Adds a read-only Explore agent definition pinned to haiku / low effort to override built-in inheritance behavior.
.claude/commands/efficient-orchestration.md Updates the Claude Code command content to the improved orchestration guidance.
.codex/skills/efficient-orchestration/SKILL.md Regenerates the Codex skill copy with the updated orchestration guidance.
.copilot/skills/efficient-orchestration/SKILL.md Regenerates the Copilot skill copy with the updated orchestration guidance.
.antigravity/skills/efficient-orchestration/SKILL.md Regenerates the Antigravity skill copy with the updated orchestration guidance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rlorenzo
rlorenzo merged commit f347aca into main Jul 24, 2026
6 checks passed
@rlorenzo
rlorenzo deleted the claude/orchestrator-skill-improvements-24wxw9 branch July 24, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants