Repository navigation
Closed
Labels
Description
Parent
What to build
Route factory Commands that use User config defaults across [harness] routes and [security] routes per session Step according to machine-local Plan usage, acting both proactively before a Step starts and reactively when a session stops on structured provider Plan-usage evidence, with clean mid-Step worktree resets and exponential cooldown revalidation.
Specifically:
- Before starting each session Step on a factory Command whose Harness comes from User config defaults, select the first available route from
harness.routes(orharness.defaultwhenroutesis empty), and for Security reviews and Security runs walksecurity.routeswhen set or fall back from plan-limited / pre-first-turn-failedsecurity.harnessthroughharness.routes(harness.defaultwhen unset). - Keep routing strictly machine-local (zero Fleet HTTP calls during Pass or Step admission), refreshing candidate
codex/musenon-billed probes only when a candidate's local snapshot is missing, pastresets_at, or older than ~5 minutes. - Proactively skip routes in cooldown or whose included Plan window utilization is at/above the route's or
[harness]'smax_utilization(or100%/ordinaryUsageAllowed == false/spendControlReached == true), routing away before spending Codex credit balances unlessallow_credits = true. - Keep explicit CLI
harness/modelflags, explicit Custom-process Stepharnesspins, Experiments and Scoring runs pinned; never route away from a cybersecuritySafeguardRefusal(which still holds Self-merge, ADR 0021). - Reactively reroute a Step onto the next configured route (trying each route at most once per Step, always as a fresh session and never a cross-Harness Resume) when a session fails on structured Harness wire-frame Plan-usage evidence—never on bare HTTP 429 transient throttling and never on agent-writable assistant or tool text (ADR 0030, ADR 0031).
- When a mid-Step limit hits after work began (
before_first_turn == false), keep local commits, discard uncommitted worktree edits (git reset --hard HEADandgit clean -fd, preserving.git/info/excludefactory handover files; on merge-conflict Repair,git merge --abortand re-merge the pinned conflict commit), switchImplementfrom fresh to the existing continuation prompt once commits or an open pull request exist on the branch, add zero quota-warning text to any Session prompt, and link every configured route's Factory skills into the worktree. - Hold exhaustion cooldowns until
resets_atwhen reported, or use exponential revalidation backoff (1h → 2h → 4h → 6h cap) whenresets_atis absent or a spend cap still rejectsbefore_first_turnafter a window reset. - Keep pull-request and notification
Built withas the single parseable primary tuple while recording every Step's actual Harness and Model in the Command log,.models.json, Command record and Run notification Session models list.
Acceptance criteria
- Factory Commands using
User configdefaults route per session Step acrossharness.routes(andsecurity.routes/harness.routesfor Security reviews and Security runs) while keeping finished Steps and landed Spec Tickets intact. - Proactive selection honors
max_utilization,allow_credits(routing away before burning Codex credits oragyGoogle AI credits by default), ~5-minute / post-resets_atlocal probe refresh, and strictly machine-local state. - Explicit CLI
harness/modelflags, explicit Stepharnesspins, Experiments and Scoring runs stay pinned, and cybersecuritySafeguardRefusalnever routes and still holds Self-merge. - Reactive fallback triggers only on structured Harness wire-frame Plan-usage rejections (never bare HTTP 429 or agent-writable prose), tries each configured route at most once per Step as a fresh session with all configured routes' Factory skills linked, and resets uncommitted mid-Step edits cleanly (switching
Implementto continuation once commits/PR exist and resetting pinned conflict merges on conflict Repair) with zero prompt changes. - Expired or timestamp-less cooldowns revalidate with 1h → 2h → 4h → 6h backoff when
before_first_turnrejections persist (such as a monthly spend cap outliving a weekly reset), andBuilt withremains a single Scoring-compatible tuple while per-Step attribution records what actually ran. - Integration tests verify proactive reserve routing,
security.routes/harness.routesfallback, mid-Step commit preservation + uncommitted discard +Implementcontinuation + conflict-Repair merge reset, pin/Eval/safeguard invariants, and exponential revalidation.
Activity
JacobStephens2 commentedon Nov 14, 2026
Closed by #2200, merged into issue-583 by a thirdshift Ticket run with Self-merge.