GeezerVison is showing github.com — Routing policy: when specialist/summit is allowed, native session model switching, subsession pool selection · Issue #2169 · developing-today/code
Routing policy: when specialist/summit is allowed, native session model switching, subsession pool selection #2169DescriptionWhat this is
Route pools landed in PR #915 (design record doc/2026-10-25T21-11-31Z_design_route-pools/): tiers scout / workhorse / specialist / summit over per-model plan pools. What is missing is the policy layer and the OpenCode-native affordances. Drew directed 2026-10-29: write the escalation policy; make sure OpenCode sessions can natively change their own model; let subsessions select route pools; and make OpenCode pool-aware — prefer managed pool routes over individual model pins, without making it a hard rule.
1. Escalation policy (draft for Drew's approval)
- Workhorse is the default for all routine work (Decision 008 stands).
- Specialist is acceptable when any of: the task is design or deep-reasoning work; workhorse has already failed once on the same task; the code is a critical path (auth, money, data loss); the task is reviewing specialist-tier output.
- Summit is rare — only when: specialist has failed on the task; OR the decision is one-shot and gates many downstream tasks; OR Drew directs it. Every summit use is logged with its reason, and the daily token check-in flags summit if it exceeds ~2% of fleet tokens.
- Escalation is one tier at a time unless the failure mode clearly skips a tier.
2. Native model switching in OpenCode
OpenCode's own instructions must tell sessions they may change their own model mid-session when the policy above calls for it, and how: switch, note the reason in the session record, continue. No external babysitter should be required for a session to escalate itself.
3. Subsessions select route pools
A subsession is spawned against a route pool (tier), not a raw model, by default. The pool resolves the actual model. A specific model may be requested when the task needs a capability only that model has.
4. Pool awareness, managed-first
OpenCode's instructions state the pool map (tiers + plan pools) and prefer managed pool routes over individual model pins. This is a preference, not a hard requirement: pinning a specific model stays allowed, with a reason.
Acceptance
- Policy text (with Drew's edits) landed where OpenCode reads its instructions.
- A live session demonstrably escalates its own model per policy and logs the reason.
- A subsession demonstrably spawns on a pool route.
- Summit uses show up in the daily token check-in with reasons.
Activitydeveloping-today commented on Oct 29, 2026 dezren39 commented on Nov 3, 2026 🤖 Agent note · triaged at current main — substrate landed, policy layer not landed, §1 draft awaits Drew's approval
- Agent: queue worker (repo-worker-code), lane code-i
- Session / ID: queue task 7857
- Found via: repo-health-code-pilot claim (coverage pass 2026-11-03)
- Verified at: laptop primary clone, origin/main
1e3763faf, 2026-11-03.
What has landed since this issue was filed (2026-10-29):
What has NOT landed — the actual ask of this issue:
.opencode/instructions/ — the place OpenCode sessions read — contains only mcpx.md and subagents.md. Neither contains the escalation policy (§1), any statement that a session may switch its own model mid-session or how (§2), any rule that subsessions spawn against a route pool rather than a raw model (§3), or the managed-routes-first preference (§4). subagents.md is entirely about subagent-first workflow and never mentions pools or tiers.
- Partial §3/§4 only: some agents in
opencode.jsonc are bound to route models (opencode-route/workhorse, .../scout, .../specialist), but that is per-agent config, not a session-facing policy, and other seats remain raw model pins with no stated preference rule.
- None of the four acceptance items can be checked off: no policy text where OpenCode reads it, no demonstrated self-escalation by a live session, no demonstrated pool-route subsession spawn, no summit-reason logging in the daily token check-in.
Blocker / ordering: §1 is headed "Escalation policy (draft for Drew's approval)" — the policy text is to land "with Drew's edits", so the wording is Drew's call before anyone can land §§1–4 as instructions. Escalating that one decision: this issue gets user/escalated with the specific question — approve the §1 draft as written (workhorse default; specialist on design/deep-reasoning/one workhorse failure/critical path/reviewing specialist output; summit only after a specialist failure, a one-shot gating decision, or Drew's direction, logged with reason, ~2% token flag), edit it, or drop it?
Scoped fix path once the draft is approved (one small_fix): add .opencode/instructions/routing-policy.md carrying the approved §1 text plus §2 (sessions may switch their own model per policy and log the reason in the session record), §3 (subsessions spawn against a route pool by default; a specific model only for a named capability), and §4 (pool map summary; managed pool routes preferred over individual pins, pinning allowed with a reason) — then a live-session demonstration of a self-escalation and a pool-route subsession spawn for the remaining acceptance items. No implementation task is enqueued yet: it would only sit blocked on the same approval; enqueue it against this issue the moment the draft is ruled on.
developing-today commented on Nov 3, 2026 agent-note:v1
state: triaged (coverage pass)
Coverage pass 2026-11-03: reviewed in the fleet-wide per-issue pass (drift / overlap / already-handled / stale / blockers / ordering). Verdict: still live; queued in repo-health-code-pilot as triage at priority 30 (priority/none). If this is already handled at current main, the triage closes it with evidence; if it needs splitting, the triage files the split.
Found via: coverage pass 2026-11-03 dezren39 commented on Nov 14, 2026 🤖 Agent note · blocked (task 8592, re-triage)
Gate still unmet. Fresh GitHub revalidation (2026-11-14): #2169 remains OPEN with user/escalated label. The issue is a routing-policy design decision (when specialist/summit is allowed, native session model switching, subsession pool selection) drafted for Drew's approval. No approval or decision has been posted since the 2026-11-03 escalation. The unblock-all release did not change this.
Decision required from Drew: approve/adjust the escalation policy draft (workhorse default, specialist acceptability criteria, summit rarity + logging, one-tier-at-a-time), and the OpenCode-native model-switching/pool-awareness affordances.
Labels: queue/queued plus work/assigned removed; queue/blocked plus status/blocked added (user/escalated already present).
dezren39 commented on Nov 16, 2026
Agent note — routing policy ADOPTED as de-facto behavior (task 8592, lane any-b, 2026-11-16)
State: triaged — the decision this issue waited on is recorded, and the policy is documented here per its terms.
Decision: pending-decisions ledger item routing-policy-2169, answered 2026-11-16T02:00:33-06:00 via orchestrator-audit-2026-11-16: "Adopt the fleet's current de-facto behavior as the policy, documented on the issue."
The policy, as adopted (de-facto behavior, checked against the draft in this issue):
- Tiers and escalation. Workhorse is the default route for routine dispatched work. Roles and agent definitions state REQUIREMENTS only (strength floor + speed flag); named-model pins in role/agent defaults are banned (Decision 008) — the resolver picks the model live from pool state. Specialist-tier work is design and deep-reasoning work. Summit is not a general escalation tier: under the design-mill pattern, ONE summit session OWNS a large multi-part design item end-to-end and delegates everything it can spec to workhorse subsessions; Muse does the intake (starter issue, docs, queue item). Summit use is therefore structural and visible on the item it owns, not a per-task upgrade.
- Model switching — the draft's §2 is superseded by de-facto practice. There is NO in-session model switch: a session runs the route head it was launched with. Escalation happens by launching a NEW session on the appropriate route with the right model and effort chosen deliberately at launch (by plan/quota size and availability, never left at default). Any instruction text written from this policy must state the no-switch rule, not the draft's switch-in-place rule.
- Subsession pool selection. A dispatching session does not pick pools per subsession: when Muse dispatches OpenCode sessions it uses the
workhorse route and lets the ROUTE own pool selection and failover. Dispatch is gated on a quota read ≤60 minutes old for the pool; pools burn toward 100% at their reset, soonest-expiring first; a failed or stale quota read never idles a pool (probe inference, dispatch on last known state). Plan quotas only — a quota error is a wall, never a pay-as-you-go fallback (the one named exception is the DeepSeek direct reserve for when every plan is used up).
- Pool awareness, managed-first. Holds as drafted: managed pool routes are preferred over individual model pins; a pin stays allowed with a stated reason (a capability only that model has).
Remaining acceptance work (follow-up enqueued from this triage): land this policy text where OpenCode reads its instructions (with §2 corrected to the no-switch rule), and run the two demonstrations the acceptance asks for (a session escalating via a fresh launch on a higher route with the reason logged; a subsession spawning on a pool route). Summit/design-mill usage is already visible per item; folding it into the daily token check-in remains part of that follow-up.
Labels synced: stale user/escalated, queue/blocked, status/blocked removed (the escalation is answered); the follow-up carries the implementation. dezren39 commented on Nov 16, 2026 Conductor dispatch — task 17427 (2026-11-16 13:31Z)
Bound to queue task 17427 (repo-health-code-pilot, claim fleet-conductor, claimed 13:30:47Z).
- Session
ses_e5e1b71ec35ffeX2zp33V9ia3Q, pooled route opencode-route/workhorse.
- Worktree
/home/user/git/fleet/17427-2169-routing-policy, branch queue/17427-2169-routing-policy off origin/main 56d907c6be.
- Scope: land the adopted policy text (lane any-b note, task 8592) in the instruction surface OpenCode sessions read, with the NO-in-session-switch rule stated; then run the two acceptance demonstrations (fresh-launch escalation with logged reason; subsession on a pooled workhorse route).
- Engagement verified from message content: preflight run, adopted-policy note under read.
dezren39 commented on Nov 16, 2026
🤖 Agent note — routing policy landed + acceptance demonstrations (SMALL FIX task 17427)
- Agent: fleet queue worker
fleet-conductor (queue repo-health-code-pilot)
- Session: task 17427; branch
queue/17427-2169-routing-policy off origin/main 56d907c6be
- PR: docs(instructions): land adopted routing policy for #2169 #10763
- Policy source: the adopted text in lane any-b's triage note above (task 8592, 2026-11-16). The draft's "switch model in place" section is superseded — the landed text states the no-in-session-switch rule.
Files changed
| File |
Change |
.opencode/instructions/routing-policy.md (new) |
Adopted policy text, session-facing |
.opencode/opencode.jsonc:2402 |
Added to the instructions array (with mcpx.md, subagents.md) |
AGENTS.md:115-122 |
"Routing policy" section pointing at the instruction file; 7966 bytes (< 8000 budget) |
Canonical text lives in the code repo (this repo), not the forks repo; nothing fork-side was needed.
Policy text landed (key lines)
.opencode/instructions/routing-policy.md:3-5 — "Adopted 2026-11-16 on Routing policy: when specialist/summit is allowed, native session model switching, subsession pool selection #2169 … the fleet's de-facto behavior is the policy. This file supersedes the issue's original draft, including its 'switch model in place' section."
:11-12 — workhorse is the default route for routine dispatched work.
:14-18 — roles/agent definitions state requirements only; named-model pins banned (Decision 008), resolver picks live from pool state.
:19-22 — specialist = design/deep-reasoning; summit is structural (design-mill owner + workhorse delegates), not a per-task upgrade.
:26-27 — "A session runs the route head it was launched with. No in-session model switch exists, and none should be attempted."
:28-34 — escalation = a NEW session launched on the appropriate route, model/effort chosen at launch, reason recorded in the session record.
:38-47 — subsession dispatch on workhorse, route owns pool selection/failover; ≤60-min quota gate; plan quotas only, no PAYG fallback (DeepSeek direct reserve the sole exception).
:51-53 — managed pool routes preferred over pins; a pin needs a stated reason.
Demonstration (a) — escalation via fresh launch on a higher route, reason logged
- Session:
ses_e5e1b6d9a9dffe7We2MK1ZTKeR (fresh launch, requested route opencode-route/specialist; no in-session switch).
- Reason in the session record (launch prompt, first user message): "escalated to specialist: policy-wording review against the adopted Routing policy: when specialist/summit is allowed, native session model switching, subsession pool selection #2169 policy".
- Task performed: review of the landed policy text against the adopted note (found no contradictions; noted two non-contradicting extras: the "unlogged launch ≠ escalation" sentence and the Readiness/evidence section).
- Serving evidence (
route_usage, this session): pools specialist; models opencode-go.developing-today-0/muse-spark-1.3-contributor x2; serving last step: …/muse-spark-1.3-contributor#medium via route specialist (outcome success); no failover. The child runtime did not expose the leaf to itself, so the serving readout above is the receipt.
Demonstration (b) — subsession on a pooled route with route-owned pool selection
- Session:
ses_e5e1b6d9a96ffevqjT8rKxxvzL — launched with model opencode-route/workhorse (route only; no leaf pinned).
- Task performed: wiring verification of all three files (returned PASS on all three, with the line receipts reproduced above).
- Serving evidence (
route_usage, this session): pools workhorse; models opencode-go.developing-today-0/deepseek-v4.1-flash x3; serving last step: …/deepseek-v4.1-flash#low via route workhorse (outcome success); no failover — the leaf was chosen by the route, not by the launch.
Open questions (with the default chosen — not blocking)
- Extra sentences beyond the adopted verbatim text. The readiness/evidence section and the "unlogged launch is not a policy escalation" sentence are additions. Default chosen: keep them, they operationalise the accepted rule without changing it; they can be trimmed in review if unwanted.
AGENTS.md headroom. After the 9-line pointer section the file is 7966/8000 bytes (34 bytes left). Default chosen: leave it; any further AGENTS.md addition must trim elsewhere.
- Summit-in-token-check-in item. The triage note listed folding summit/design-mill visibility into the daily token check-in as remaining work. Out of scope for this instruction-text fix; not claimed done here.
Queue task 17427 is completed with this comment as the receipt.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|