Repository navigation
- Observed on Claude Code 2.1.332 with the real CLI against a fixture API (
tests/claude/router-compact-runtime.test.ts, run withJEV_CLAUDE_E2E=1): once a turn's context passes the window, the host sends a summary request on the native model and effort (Opus at xhigh in the test) and goes on with the same turn. Under v0.8.82 the requests after it went out on the turn's routed pair: an effort route stayed on medium, and an Opus to Haiku switch held for its unknown cache cost moved to Haiku once the compaction left no cache warm. The transcript's api-request rows give the same effort for each. With the v0.8.81 rule, which stopped the turn at a reset, the same test sends xhigh after the compaction. The summary request is no turn step, so it stays on the native pair. - A model switch whose effort answer fell short of its threshold keeps the baseline's effort. When the target does not take that level (Opus at xhigh to Sonnet, which takes no xhigh unconditionally), the switch was dropped as
pair_invalidand the turn stayed native. It now runs at the deepest level the target accepts below the baseline's (Sonnet at high), with effort reasonnearest_below. An invalid effort answer, an effort lock, a risk hold or effort routing off still keep the native call, and the effort is never deeper than the baseline's. In the Router records of 2026-11-24 and 11-25, 4 root decisions endedpair_invalid, each with its effort answer short of the threshold: one Opus-at-xhigh turn whose capability answer chose Sonnet, which now selects Sonnet at high, and three on a Sonnet-at-xhigh baseline that kept its model and are unchanged. This is read from the recorded answers, not replayed. A cache-cost hold still applies to such a switch: like any held switch, the turn then runs the pair the answers choose with the model kept (Opus at the effort its own answer cleared), where the dropped switch left it native. - A held switch's root record gave the proposal's effort reason next to the kept pair's effort, which is what runs. It now gives the kept pair's own effort reason; the proposal's stays in
proposed_patchandselection. - The A/B bench reader (
src/bench/ab.ts) attributed a routed root request byrequest_id, which the Router never writes: itsroot_resultnames the transcript's api-request asrequest_ref. No routed request was attributed, so a condition D cell that switched models read as a model mismatch. It now joinsrequest_refto the transcript'srequestRef, and reads a turn resumed after a context reset from itsroot_resumerecord (#424). - Measured: none (no token or cost measurement). The compaction behaviour above is observed with a fixture API, not on a live session.
Archive SHA-256:
jev-gate-0.8.83.zip:ff996f1189800721d8c73ce7cb0b9be37a5e35f9602f4ec34c6468b44e2d78de
Codex archive SHA-256:
f6409dcd5271455ee4260a1cc061a9fbbb89c9463803d309325900046a871982 dist-release/jev-gate-codex-0.8.83.zip