Skip to content

fix(pending-input): make body-lost channel re-drive terminal at admission (replaces #9) - #10

Closed
amittell wants to merge 3 commits into
deploy/v2026.9.4-carry-20260914from
fix/reinject-94-bodyless
Closed

amittell wants to merge 3 commits into
deploy/v2026.9.4-carry-20260914from
fix/reinject-94-bodyless

Conversation

@amittell

Copy link
Copy Markdown
Owner

Supersedes #9 (closed 2026-09-14)

#9's blanket committed-replay queued -> consumed flip was held for the regression it causes (post-persistence crash window loses the reply; 3 chat-b restart-recovery cases) and because the re-drive continued after deploy. That seam fix (isSourceTurnReplay, 412401062a3) is already merged into the carry line and running live.

This PR closes the remaining gap on the live carry base (37ea9f110ba): a committed channel re-drive with a lost body (empty content) slips past isSourceTurnReplay's byte-compare and is admitted as a fresh agent turn.

Change (1 commit, +95/-3, 2 files)

  • Seam (session-accessor.pending-inputs.ts): a channel-user:v1:<hash> idempotency key is deterministic per inbound messageId (one message). A committed hit under it is a re-drive by definition, body or not, so it is terminal at admission (consumed) unless a pending, non-terminal restart-recovery claim must re-deliver this exact source — the v1 lesson (never drop legitimate recovery). Run-id keys keep isSourceTurnReplay byte-for-byte (a same-runId new turn, e.g. agent.wait, stays admitted).
  • Test (session-accessor.pending-inputs.redrive-bodyless.test.ts, sibling file — keeps the 1000-line max-lines cap clear): body-lost channel re-drive, committed, new run id.

Composes with the carry's existing seam fix; no conflict, no downgrade (based on the live commit).

A/B on the exact live base (verified 2026-09-14, scratch branch, no build/restart)

Suite Base 37ea9f110ba With this patch
Body-lost channel re-drive repro FAIL (admitted as fresh turn = the ghost) PASS (suppressed)
9.4's own re-drive test (run-id path) PASS PASS
Full pending-inputs custody file (38) PASS PASS
chat-b full (138) 3 failed / 135 passed identical — the 3 failures are pre-existing on the carry line (documented in 412401062a3's note: "chat-b remains 3 failed (unchanged)"); this patch changes nothing there

Addresses the two P1 findings from #9 by design

  1. "Preserve committed turns for reconnect recovery" — the recovery-claim guard: requiresRedelivery keeps a pending non-terminal restart-recovery re-delivery admitted (queued) for its exact source. Committed transcript presence is no longer by itself terminal.
  2. "Exercise replay through the actual channel entry point" — the repro drives createUserTurnTranscriptRecorder -> stageApproved -> persistApproved (the committed path the channel recorder uses) with the real channel-user:v1: key format, and pins the run-id/agent.wait admission case separately in the sibling file.

Not a deployment

Merge is review-gated. The live gateway stays on 2026.9.4-37ea9f110bad until this is adversarially reviewed, signed off, and deployed through the staged-dist + kickstart + verify flow.

…sion (9.4 port)

Live 9.4-carry base (37ea9f1) already guards body-MATCHED committed re-drives
via isSourceTurnReplay (content byte-compare, 4124010). But the re-queued
Telegram ghosts arrive with their body LOST (empty content), which the byte-compare
cannot see, so they were admitted as fresh agent turns - the observed ~9x re-drive
of one DM inbound.

A channel-user:v1:<hash> idempotency key is deterministic per inbound messageId
(one message). A committed hit under it is a re-drive by definition, body or not,
so make it terminal at admission (consumed) - UNLESS a pending, non-terminal
restart-recovery claim must re-deliver this exact source (the v1 lesson: do not
drop legitimate recovery). Run-id keys keep the byte-compare unchanged (a
same-runId new turn, e.g. agent.wait, stays admitted).

Bounded A/B on the exact live base (scratch branch, no build/restart):
  repro (body-lost channel re-drive): base ADMIITS (bug) -> fix SUPPRESSES (green)
  9.4's own re-drive test (runId path): stays green
  full pending-inputs custody file (38): all green
  chat-b full (138): 3 failed | 135 passed = IDENTICAL to base (the 3 are the
    pre-existing 9.4-carry restart-recovery failures, unchanged - no new failures)

Composes with, does not conflict with, the carry's existing seam fix.
Local port; upstream issue openclaw#142116.
Copilot AI lite review requested due to automatic review settings September 14, 2026 21:54
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

🟡 Changes recommended

A critical terminal-receipt handling issue and additional recovery-claim/test coverage gaps remain.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR prevents bodyless channel re-drives from starting duplicate agent turns while preserving legitimate recovery delivery.

Changes:

  • Treat committed channel-bound inputs as consumed.
  • Preserve eligible restart-recovery claims.
  • Add bodyless re-drive regression coverage.
File summaries
File Findings
src/config/sessions/session-accessor.pending-inputs.ts Critical: exclude already terminal recovery receipts. Moderate: require active claims and validate the canonical channel-key shape.
src/config/sessions/session-accessor.pending-inputs.redrive-bodyless.test.ts Moderate: add coverage for active, terminal, and stale recovery claims through stageApproved.
Review details

Suppressed comments (4)

src/config/sessions/session-accessor.pending-inputs.redrive-bodyless.test.ts:67

  • The new regression covers only the no-claim body-lost replay. The exception added here is the safety-critical path that must keep a legitimate active channel recovery admitted, but no owner-boundary case seeds matching restartRecoveryDeliveryRunId/restartRecoveryDeliverySourceRunId and verifies that stageApproved remains admitted (or that a terminal/stale claim is suppressed). Add that case through the same recorder → stageApproved path before relying on this guard.
    const reDrivenStaged = await reDriven.stageApproved?.({
      runId: "re-driven-run",
      assertCurrent: () => {},
    });
    // BASE (bug): true — admitted as a fresh agent turn (the ghost).
    // FIX: false — channel-bound committed hit is terminal at admission.
    expect(reDrivenStaged).toBe(false);

src/config/sessions/session-accessor.pending-inputs.ts:264

  • The new recovery override is not exercised by the added or existing sibling regressions: the bodyless test has no recovery claim, while dispatch-from-config.pending-restart.test.ts uses a ${runId}:user key, so isChannelBoundKey is false. Add a case with a committed channel key and a matching non-terminal recovery claim, asserting that recovery remains admitted while an ordinary channel re-drive is consumed; otherwise both sides of this P1 guard can regress unnoticed.
        const requiresRedelivery =
          isChannelBoundKey &&
          typeof claimSource === "string" &&
          claimSource.length > 0 &&
          claimSource === idempotencyKey &&

src/config/sessions/session-accessor.pending-inputs.ts:264

  • This treats any non-empty delivery claim as a recovery exception, even when the session claim is stale on a terminal run. Claims can survive a done/failed status until cleanup, and the existing restart-recovery owner explicitly treats only status === "running" as an active source claim; without that check, a committed channel key can return queued and let a direct stageApproved caller start a fresh turn instead of suppressing the stale replay. Require an active claim here (for example, check the running status or use hasActiveRestartRecoverySourceClaim).
        const requiresRedelivery =
          isChannelBoundKey &&
          typeof claimSource === "string" &&
          claimSource.length > 0 &&
          claimSource === idempotencyKey &&

src/config/sessions/session-accessor.pending-inputs.ts:256

  • Checking only the prefix also classifies run-keyed turns as channel-bound. chat.send accepts any non-empty client idempotency key, and run-keyed transcript keys are ${runId}:user, so a valid run id beginning with channel-user:v1: will be suppressed on a later same-run turn with different content instead of using the byte comparison described above. Match the canonical channel-user:v1:<64-hex> shape (or share a predicate with source-turn-id.ts) and update the fixture to use buildChannelSourceTurnId.
        const isChannelBoundKey = idempotencyKey.startsWith("channel-user:v1:");
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Requesty added 2 commits September 14, 2026 21:05
…rive claim guard (Copilot P1 on #10)

restartRecoveryDeliveryReceiptState 'delivered-terminal' is a durable
'already delivered' outcome that can coexist with the live claim until cleanup
(restart-recovery-receipt.ts complete/cancel). A crash in that window leaves no
tombstone, so the claim guard would return queued and stageApproved could admit
a source whose recovery delivery already succeeded. Exclude it; terminal-pending
(delivery still in flight / ambiguous) still authorizes re-delivery by design.

Pinning tests (redrive-bodyless): body-lost re-drive suppressed; delivered-terminal
claim does NOT re-drive; terminal-pending claim STILL re-drives.
A/B on live base 37ea9f1: all green, chat-b identical to base (3 pre-existing).
… (adversarial review 2026-09-15)

Behavior-neutral comment-only change addressing both reviewers' P3/P2 documentation
notes: atomic claim/tombstone cleanup invariant + the live-claim window where the seam
fails open toward recovery (self-resolves once the claim clears).
@amittell

Copy link
Copy Markdown
Owner Author

Review record (2026-09-15)

Copilot P1 (delivered-terminal receipt could authorize a re-drive) — addressed: commit 2cb4984 excludes delivered-terminal from the claim guard; pinned by 3 tests (body-lost suppressed / delivered-terminal not re-driven / terminal-pending still re-drives). Thread replied with evidence.

Adversarial reviews (ordered 2026-09-14 17:57 EDT):

  1. chilisaus (fresh subagent, xhigh, worktree /tmp/wt-pr10-review, targeted vitest): APPROVE-WITH-NITS. Both fix(pending-input): make committed source-turn replay terminal at admission #9 P1s confirmed addressed (channel entry point no longer bypassed; committed ≠ terminal by itself). All 6 findings P3/nit, each independently verified benign: raw claimSource === idempotencyKey compare is safe (both sides normalized at claim write restart-recovery-claim.ts:205,315 and at the seam by readMessageIdempotencyKey); guard unreachable by control-UI/internal claims (channel-user:v1: precondition + claim.ts:278); fail-closed direction correct; custody branch byte-identical to base; scope isolation airtight via sessionId guard.
  2. kebabablebot (mac-mini.lan, max-harsh code-level, self-contained bundle — no clone/tests): APPROVE-WITH-NITS. No P1. One P2: during a live claim the seam cannot distinguish the ingress watchdog's re-queue of that source from the recovery dispatch's own redelivery, so it fails open (admit) toward recovery; bounded by atomic claim/tombstone cleanup and self-resolves once the claim clears — reviewer: "acceptable as-is". Follow-up P3s (document the window; note the atomic-cleanup invariant) — addressed in ead860c (behavior-neutral comments only).

A/B on live base 37ea9f1 (all verified locally, scratch branch, no build/restart during testing): body-lost repro base-FAILS/fix-PASSES; 9.4's own re-drive test green; full pending-inputs custody 38/38; chat-b full identical to base (3 pre-existing / 135 passed — the 3 are documented pre-existing on the carry line in 4124010's note).

Live canary (informational): the user's /restart at 2026-09-14 20:35 EDT rebuilt dist from this branch, so commit 1 (40d4337) has been running live since 00:49 UTC. Post-canary DM-lane telemetry: 0 ghost re-drive admissions, 0 failed/re-queued ingress events. Commits 2–3 (delivered-terminal refinement + review docs) are not yet in the running build; a deliberate rebuild from head would fold them in.

Status: zero unresolved findings (P1 fixed; P2 acknowledged + documented; P3s fixed/nits). Merge held for owner sign-off per repo discipline. Not deployed as part of this PR.

amittell added a commit that referenced this pull request Sep 15, 2026
…ership consumes

01f985c made a committed source turn terminal at admission unless the key
belongs to the current run. That is right for the ghost re-drive, and it misses
one case: restart recovery re-drives a source turn under a NEW recovery run id,
so its key belongs to the ORIGINAL run and never to this one. Key ownership
therefore consumes it and the legitimate re-delivery is dropped - PR #9's P1,
and the case PR #10's claim guard exists for.

So a committed replay stays admitted when EITHER the key belongs to this run OR
a restart-recovery claim still owes this exact source turn. A delivered-terminal
receipt does not authorize a re-drive (terminal-pending and delivery-ambiguous
still do). Both key forms are matched because a claim records the source turn id
while the replay may arrive as "<sourceTurnId>:user".

Composed from three prior designs rather than picking one: key ownership
(01f985c, on this line), the channel-bound claim guard and its
delivered-terminal refinement (PR #10 40d4337 + 2cb4984, built on the
carry's byte-compare), and the ":user"-stripped source match (fbee1cab18a,
unpushed on rh-bot). Uses the canonical hasRestartRecoverySourceClaim /
hasRestartRecoveryTerminalRun helpers instead of re-implementing the claim
shape; note the "active" variant is deliberately NOT used, since it requires
entry.status === "running" and a recovery entry is "failed".

Also reads the session entry row once and reuses it, instead of re-reading the
same row inside the committed branch of the same exclusive write.

PRE-FIX CONTROL (measured on this branch, before the seam change): the ported
PR #10 suite ran 2 passed / 1 failed, failing on the assertion
"expected false to be true" in the terminal-pending recovery case - the exact
case above, failing on its assertion rather than on an import.
@amittell

Copy link
Copy Markdown
Owner Author

2026-09-15 follow-up findings (canary period) — captured per owner scope: installer + empty-msg bug

1. Swift installer finding (2026-09-14 23:02 EDT, rh-bot)

  • Install cut off mid-way (SIGTERM, timeout-likely): scripts/install-cli.sh, scripts/install-periphery.sh, scripts/install-swift-tools.sh
  • Verified state: repo git clean; node_modules (3.0GB) + dist/ built ~20:45 present; ~/.openclaw/bin/openclaw + ~/.openclaw/tools/ missing (wrapper publish step never ran — no functional impact, active CLI runs from ~/.openclaw/tmp/agent-cli on 2026.9.4); periphery binary + .build/swift-tools never landed
  • All three scripts are safe to re-run (idempotent / SHA-256 verified). Rerun pending owner go-ahead.
  • "deploy state dir" sub-finding: 14:08 heartbeat ls output was truncated in the completion notice; surviving fragment implies a …deploy-suffixed state dir (3 entries, created Mar 22 22:08) containing a ~903KB (902905-byte) file dated Mar 3. Exact-size hunt on rh-bot (15:10) found nothing → the "present here on rh-bot" claim is UNVERIFIED; re-check on both hosts pending.

2. "Empty message" root cause (2026-09-15, resolved — NOT a transport bug)

3. Canary status (this PR's fix, unchanged)

  • Zero re-drive admissions and zero failed/re-queued DM ingress since 00:49 UTC. Ghost loop confirmed dead.

@amittell

Copy link
Copy Markdown
Owner Author

This PR is superseded by c986d872da5, which is on upgrade-v2026.9.4 and running on both production gateways. Recommending close — evidence below, not an assertion.

c986d872da5 ("fix(pending-input): admit a restart-recovery re-delivery that key ownership consumes") composed this PR's guard with 01f985cab95's key-ownership work and rh-bot's fbee1cab18a, and it names this PR's commits in its own message:

40d43375492  make body-lost channel re-drive terminal at admission        -> composed into c986d872da5
2cb49844418  exclude delivered-terminal receipts from the re-drive claim   -> composed into c986d872da5
ead860ccd85  docs: the acknowledged claim-window fail-open                 -> text is in c986d872da5's comment

Verified as behaviour rather than as a commit-graph claim, because symbol absence is not behaviour absence:

deployed dist, both gateways   hasRestartRecoverySourceClaim   5 files
                               channelBoundKey                  1 file
                               answeredAlready                  1 file

Since then the seam was merged once more (the parked save/pending-input-marker) and the two rules that lived there were collapsed into one, as b386f827465 required of whoever merged it. The rule now selects its arm by KEY SPACE:

  • channel-user:v1:<hash> — deterministic per inbound messageId, so a committed hit is a re-drive by definition. Terminal unless a live restart-recovery claim still owes that exact source. This is this PR's rule, preserved.
  • everything else (<runId>:user) — no such determinism, so the answered-turn marker decides.

One correction that matters for anyone reading this PR's reasoning later: the predicate 01f985cab95 used (key ownership) was described as "dead code in production". That is true for an in-process retry and false across a recorder boundary — a retry that builds a new recorder carries the ORIGINAL run's key under a NEW run id, and so does restart recovery. So key ownership did not merely fail to consume; it also consumed legitimate re-drives. Key space, not key ownership, is what selects the arm.

Measured on the collapsed rule (Air, node 22.23.1): pending-inputs + redrive + redrive-bodyless + completed-turn 50 tests pass; the restart-recovery suites that held PR #9 (chat-send-pending-inputs, chat-pending-inputs, agent-command-restart-recovery, main-session-recovery, restart-recovery-receipt) 375 tests across 13 files pass; pnpm tsgo:core exit 0. Mutation control: restoring the old key-ownership predicate with all marker plumbing kept gives 6 failures, every one expected 'consumed' to be 'queued'.

Live re-delivery on the deployed rule, both gateways, with planted positive controls that must fire:

transport, same updateId received more than once     0 of 6,197 and 0 of 19,515 distinct updates
same idempotencyKey persisted twice as a user turn   0 and 0
a later run resubmitting the same user turn          0 of 70 and 0 of 53 channel turns
                                                     (0 of 1,927 over 90 days)

Nothing here is lost by closing: the rule this PR introduced is what ships.

@amittell

amittell commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

Closing as superseded, re-checked on the line both bots now run. The rule this PR introduced is in upgrade-v2026.9.9 at 543080ee633: a committed channel-user:v1: hit is terminal unless a live restart-recovery claim still owes that source and the receipt is not delivered-terminal (session-accessor.pending-inputs.ts, byte-identical to the 9.8 line). Upstream v2026.9.9 does not have it (0 hits), so it stays a fork carry. It arrived composed through c986d872da5: 0 of this PR's 3 patch-ids match anything on the 9.4, 9.8 or 9.9 lines.

Measured on 9.9 today, the 4 pending-inputs files including this PR's redrive-bodyless suite pass 49/49. Forcing the channel-bound arm off fails 2 of 3 of this PR's cases (expected true to be false) and leaves the terminal-pending recovery case green.

The 24 red checks belong to the old 37ea9f110ba carry base, not this diff. Every type error is in src/plugins/session-entry-slot-keys.ts; lint is src/channels/turn/lifecycle.ts and extensions/memory-lancedb/memory-refresh.ts; checks-fast-baseline-ratchets is the config-doc budget (core 2422 > 2421, plugin 4138 > 4137); knip flags 8 unused exports elsewhere. The 7 failing test files are all outside the 2 files this PR touches, and the 3 chat-b failures are the ones already shown identical on base. label and label-issues never got a runner (Blacksmith label, 24h, 0 steps).

@amittell amittell closed this Oct 9, 2026
amittell pushed a commit that referenced this pull request Oct 9, 2026
openclaw#166738)

Builds on openclaw#166737 (merged: curated `scripts/lib/recommended-models.json` + shared `canonicalModelKey`/`canonicalModelFamily`/`compareModelRecency`); this PR only adds the helper script and its test.

## What Problem This Solves

The recommended-models list is now curated by hand, so a maintainer needs a daily, reviewable signal for what to change: new releases, Arena reorderings, and entries that are retired or no longer served.

## User Impact

No user-visible change. Maintainers (and later a daily draft-PR agent) can run

```
OPENROUTER_API_KEY=... node --import ./scripts/tsx.mjs scripts/suggest-recommended-models.mts [--list <path>]
```

and get a markdown report ending in a unified diff against `scripts/lib/recommended-models.json`. The list file is never written; a human edits it.

## Why This Change Was Made

TypeScript port of the recv2 prototype's ranking: LMArena Agent Arena score first; equal scores, and models without one, order by OpenRouter 30-day usage. The newest served family member without its own Arena row takes the slot of its newest ranked older sibling, counting at least that sibling's usage, so it sorts directly ahead of it (release date decides recency, so grok-4.20 does not outrank grok-4.7). DeepSWE is dropped; `-fast` and other serving variants fold into the base model.

- Inputs: every run fetches each source fresh, with no cache; a failed request or a response that fails schema validation fails that run. Sources: LMArena Agent Arena `agent/latest` through the HF datasets-server JSON rows endpoint (no parquet dependency), OpenRouter `/api/v1/models`, OpenRouter `rankings-daily` (only when `OPENROUTER_API_KEY` is set; otherwise curated entries without an Arena score keep their order), Vercel `/v1/models`, and the hosted catalog v2.
- Identity: each source id resolves once through the shared `canonicalModelKey`, with its display name, so dated aliases join their versioned model. Examples: `mistral-small-2603` is Mistral Small 4, OpenRouter `mistral-large-4-0` matches Vercel `mistral-large-4`, and usage arrives through OpenRouter `canonical_slug`. Non-chat models are excluded by gateway modality or type labels; `-latest` aliases are excluded.
- Report sections:
  - **New models:** first seen within 7 days and not listed. Each shows its likely same-family predecessor and both prices, and is flagged `possible new class` when either price differs by more than 2x or the family has no predecessor.
  - **Arena moves:** rank changes among entries both lists keep, largest first.
  - **Gone or deprecated:** first-party retired with its replacement, no longer served, or no signal.
  - **Suggested list:** the full ordered list plus the diff.

No overlap with Pash/Sarah changes (the PR adds one new file).

## Evidence

- Port fidelity: on the live inputs, the helper reproduced the prototype's 86-id suggested list exactly before the review-driven identity fixes. Two differences remain, and openclaw#166737's seed list already includes both: `mistral-medium-2604` is folded into `mistral-medium-3.5` because they are the same model, and `ling-3.0-flash-*` is now spelled `ling-3-flash-*` because zero minor versions fold.
- Typecheck: `node scripts/run-tsgo.mjs -p tsconfig.scripts.json` and `tsgo:test:root` report no errors; scoped oxlint and oxfmt are clean. `canonical-model-key.test.ts` passed 32/32.
- Ordering: `test/scripts/suggest-recommended-models.test.ts` feeds stubbed sources through the real entry point. Two models tied on Arena score order by usage (the higher-usage one first, against alphabetical order), and a successor that inherits its sibling's Arena slot still sorts ahead of that higher-usage sibling. With the previous alphabetical tiebreak the test fails.
- Cost: `pnpm test test/scripts/suggest-recommended-models.test.ts --maxWorkers=1` takes 2.2 s wall end to end (Vitest 0.78 s; the test itself 9 ms). CI on this head: run 37692398322, green in 595 s wall and 5,717 job-seconds across 58 jobs for the whole PR; the new test adds about 9 ms of that.
- Error and fallback paths: a list containing `claude-opus-4.8` reported "retired by its first-party provider; replaced by claude-opus-5", and `nonexistent-model-9` reported "no host serves it". A missing `--list` file exits 1 with a clear message. Without a key, the report states that usage was skipped and keeps unscored curated entries. With an invalid `OPENROUTER_API_KEY`, the run exits 1 with `https://openrouter.ai/api/v1/datasets/rankings-daily returned HTTP 401` and prints no report.
- Live run: all inputs were fetched fresh (5 requests, 3.9 s wall). Both outputs below are copied verbatim. In the live data the only exact Arena ties are successor/sibling pairs (`gpt-5.6`/`gpt-5.4`, `mimo-v2.6-pro`/`mimo-v2.5-pro`), and each successor sorts first.

Run against the curated list in openclaw#166737, using the default path:

# Recommended models suggestion, 2026-10-07

## Sources
- LMArena Agent Arena, published 2026-10-02: 50 rows, 48 models. Source: LMArena Agent Arena (lmarena-ai/leaderboard-dataset), CC BY 4.0.
- OpenRouter rankings-daily 2026-09-07..2026-10-06. Source: OpenRouter (openrouter.ai/rankings), as of 2026-10-07T21:06:52.590Z. Licensed under CC BY 4.0.
- Catalog v2 generated 2026-09-29 (1039 rows), OpenRouter models (467), Vercel AI Gateway models (415): 490 served chat models.

## New models (first seen in the last 7 days, not listed)

| model | first seen | suggested | price in/out per 1M | predecessor | predecessor price | note |
| --- | --- | --- | --- | --- | --- | --- |
| glyph-cluster | 2026-10-07 | no signal yet | ? | none |  | possible new class: no predecessor |
| mistral-large-4 | 2026-10-06 | no signal yet | $0.68 / $2.09 | mistral-large-3 | $0.5 / $1.5 |  |
| apodex-1.1-mini | 2026-10-01 | no signal yet | ? | none |  | possible new class: no predecessor |
| pareto-26.10-preview | 2026-10-01 | no signal yet | $0.8 / $3.2 | none |  | possible new class: no predecessor |

## Arena moves

None.

## Gone or deprecated

None.

## Suggested list

<details><summary>85 models</summary>

| # | model | signal |
| --- | --- | --- |
| 1 | claude-fable-5.1 | Arena 0.143 (#1) |
| 2 | claude-opus-5.5 | Arena 0.138 (#2) |
| 3 | claude-sonnet-5.5 | Arena 0.125 (#3) |
| 4 | gpt-6-astra | Arena 0.123 (#4) |
| 5 | gpt-6.1-sol | Arena 0.112 (#5) |
| 6 | gpt-6-sol | Arena 0.097 (#6) |
| 7 | claude-opus-5 | Arena 0.087 (#7) |
| 8 | claude-fable-5 | Arena 0.082 (#8) |
| 9 | gpt-5.6-sol | Arena 0.065 (#12) |
| 10 | claude-sonnet-5 | Arena 0.044 (#13) |
| 11 | kimi-k3 | Arena 0.042 (openclaw#14) |
| 12 | grok-4.7 | Arena 0.040 (openclaw#16) |
| 13 | deepseek-v4.1-flash | Arena 0.040 (openclaw#17) |
| 14 | muse-spark-1.3 | Arena 0.040 (openclaw#18) |
| 15 | hy4-preview | Arena 0.040 (openclaw#19) |
| 16 | glm-5.2 | Arena 0.035 (openclaw#20) |
| 17 | gemini-3.8-flash | Arena 0.030 (openclaw#21) |
| 18 | qwen3.8-max | Arena 0.025 (openclaw#22) |
| 19 | glm-5.3 | Arena 0.024 (openclaw#23) |
| 20 | gpt-6-luna | Arena 0.014 (openclaw#24) |
| 21 | grok-4.6 | Arena 0.013 (openclaw#25) |
| 22 | grok-4.5 | Arena 0.012 (openclaw#26) |
| 23 | deepseek-v4-pro | Arena 0.012 (openclaw#27) |
| 24 | gpt-5.6 | Arena 0.011 (openclaw#28) via gpt-5.4 |
| 25 | gpt-5.4 | Arena 0.011 (openclaw#28) |
| 26 | step-5-preview | Arena 0.005 (openclaw#30) |
| 27 | gpt-5.6-terra | Arena 0.004 (openclaw#31) |
| 28 | glm-5.3-flash | Arena -0.004 (openclaw#32) |
| 29 | mimo-v2.6-flash | Arena -0.006 (openclaw#33) |
| 30 | gpt-5.6-luna | Arena -0.012 (openclaw#35) |
| 31 | gemini-3.7-flash | Arena -0.015 (openclaw#36) |
| 32 | qwen3.8-27b | Arena -0.017 (openclaw#37) |
| 33 | muse-spark-1.2 | Arena -0.033 (openclaw#38) |
| 34 | muse-spark-1.1 | Arena -0.049 (openclaw#39) |
| 35 | qwen3.7-max | Arena -0.051 (openclaw#40) |
| 36 | hy3 | Arena -0.054 (openclaw#41) |
| 37 | minimax-m3 | Arena -0.069 (openclaw#42) |
| 38 | qwen3.7-plus | Arena -0.072 (openclaw#43) |
| 39 | mimo-v2.6-pro | Arena -0.075 (openclaw#44) via mimo-v2.5-pro |
| 40 | mimo-v2.5-pro | Arena -0.075 (openclaw#44) |
| 41 | gemini-3.6-flash | Arena -0.077 (openclaw#45) |
| 42 | gemini-3.1-pro-preview | Arena -0.077 (openclaw#46) |
| 43 | inkling-small | Arena -0.103 (openclaw#47) |
| 44 | inkling | Arena -0.109 (openclaw#48) |
| 45 | mistral-medium-3.5 | Arena -0.124 (openclaw#49) |
| 46 | solar-pro4 | Arena -0.159 (openclaw#50) |
| 47 | space-bunny-alpha | OpenRouter 56.7T |
| 48 | deepseek-v4-flash | OpenRouter 53.3T |
| 49 | nemotron-3-ultra-550b-a55b | OpenRouter 21.1T |
| 50 | mimo-v2.5 | OpenRouter 18.9T |
| 51 | laguna-s-2.1 | OpenRouter 4.6T |
| 52 | gemini-3-flash-preview | OpenRouter 3.4T |
| 53 | ling-3-flash-fin | OpenRouter 3.4T |
| 54 | gemini-2.5-flash-lite | OpenRouter 3.0T |
| 55 | nemotron-3.5-lightning | OpenRouter 2.7T |
| 56 | gpt-oss-120b | OpenRouter 2.5T |
| 57 | dots-3-note-preview | OpenRouter 2.4T |
| 58 | gemini-3.1-flash-lite | OpenRouter 2.1T |
| 59 | gemini-2.5-flash | OpenRouter 2.0T |
| 60 | qwen3.8-flash | OpenRouter 1.8T |
| 61 | gemma-4-31b | OpenRouter 1.7T |
| 62 | claude-sonnet-4.6 | OpenRouter 1.4T |
| 63 | deepseek-v3.2 | OpenRouter 1.4T |
| 64 | qwen3.7-flash | OpenRouter 1.4T |
| 65 | ling-3-flash-sante | OpenRouter 1.2T |
| 66 | nemotron-3-super-120b-a12b | OpenRouter 1.2T |
| 67 | nex-n2.5-pro | OpenRouter 1.1T |
| 68 | ling-3-flash-vl | OpenRouter 1.0T |
| 69 | gpt-6-luna-pro | OpenRouter 853B |
| 70 | gemma-4-26b-a4b | OpenRouter 845B |
| 71 | gpt-5.6-luna-pro | OpenRouter 566B |
| 72 | solar-mini4 | OpenRouter 510B |
| 73 | deepseek-v4-flash-vision-exp | OpenRouter 430B |
| 74 | mistral-nemo | OpenRouter 384B |
| 75 | ling-3.1-flash | OpenRouter 298B |
| 76 | glm-5.3-flashx | OpenRouter 187B |
| 77 | gpt-oss-20b | OpenRouter 127B |
| 78 | gemini-3.5-flash-lite | OpenRouter 124B |
| 79 | minimax-m2.7 | OpenRouter 113B |
| 80 | gpt-4o-mini | OpenRouter 89B |
| 81 | claude-haiku-5.5 | OpenRouter 82B via claude-haiku-4.5 |
| 82 | claude-haiku-4.5 | OpenRouter 82B |
| 83 | claude-opus-4.7 | OpenRouter 55B |
| 84 | step-3.7-flash | OpenRouter 50B |
| 85 | claude-sonnet-4.5 | OpenRouter 46B |

</details>

No changes to the curated list.

<details><summary>Same inputs against the 2026-09-27 list (shows Arena moves, a drop, a 10x price flag and the diff)</summary>

# Recommended models suggestion, 2026-10-07

## Sources
- LMArena Agent Arena, published 2026-10-02: 50 rows, 48 models. Source: LMArena Agent Arena (lmarena-ai/leaderboard-dataset), CC BY 4.0.
- OpenRouter rankings-daily 2026-09-07..2026-10-06. Source: OpenRouter (openrouter.ai/rankings), as of 2026-10-07T21:07:02.742Z. Licensed under CC BY 4.0.
- Catalog v2 generated 2026-09-29 (1039 rows), OpenRouter models (467), Vercel AI Gateway models (415): 490 served chat models.

## New models (first seen in the last 7 days, not listed)

| model | first seen | suggested | price in/out per 1M | predecessor | predecessor price | note |
| --- | --- | --- | --- | --- | --- | --- |
| claude-haiku-5.5 | 2026-10-07 | openclaw#81 | $0.1 / $0.5 | claude-haiku-4.5 | $1 / $5 | possible new class: price 10.0x |
| glyph-cluster | 2026-10-07 | no signal yet | ? | none |  | possible new class: no predecessor |
| mistral-large-4 | 2026-10-06 | no signal yet | $0.68 / $2.09 | mistral-large-3 | $0.5 / $1.5 |  |
| apodex-1.1-mini | 2026-10-01 | no signal yet | ? | none |  | possible new class: no predecessor |
| pareto-26.10-preview | 2026-10-01 | no signal yet | $0.8 / $3.2 | none |  | possible new class: no predecessor |

## Arena moves

| model | listed | suggested | signal |
| --- | --- | --- | --- |
| mimo-v2.6-flash | openclaw#47 | openclaw#29 | Arena -0.006 (openclaw#33) |
| gpt-6-luna | openclaw#24 | openclaw#20 | Arena 0.014 (openclaw#24) |
| grok-4.7 | openclaw#15 | #12 | Arena 0.040 (openclaw#16) |
| deepseek-v4-pro | openclaw#16 | openclaw#23 | Arena 0.012 (openclaw#27) |
| gemini-3.8-flash | #11 | openclaw#17 | Arena 0.030 (openclaw#21) |
| hy4-preview | #10 | openclaw#15 | Arena 0.040 (openclaw#19) |
| mimo-v2.6-pro | openclaw#32 | openclaw#39 | Arena -0.075 (openclaw#44) via mimo-v2.5-pro |
| mimo-v2.5-pro | openclaw#33 | openclaw#40 | Arena -0.075 (openclaw#44) |
| gemini-3.1-pro-preview | openclaw#35 | openclaw#42 | Arena -0.077 (openclaw#46) |
| solar-pro4 | openclaw#45 | openclaw#46 | Arena -0.159 (openclaw#50) |
| gpt-6-sol | #6 | #6 | Arena 0.097 (#6) |
| muse-spark-1.3 | openclaw#14 | openclaw#14 | Arena 0.040 (openclaw#18) |
| qwen3.8-max | openclaw#18 | openclaw#18 | Arena 0.025 (openclaw#22) |
| gpt-5.6-terra | openclaw#21 | openclaw#27 | Arena 0.004 (openclaw#31) |
| qwen3.7-plus | openclaw#36 | openclaw#38 | Arena -0.072 (openclaw#43) |
| claude-opus-5.5 | #3 | #2 | Arena 0.138 (#2) |
| gpt-6-astra | #2 | #4 | Arena 0.123 (#4) |
| claude-opus-5 | #4 | #7 | Arena 0.087 (#7) |
| claude-fable-5 | #5 | #8 | Arena 0.082 (#8) |
| deepseek-v4.1-flash | #12 | #13 | Arena 0.040 (openclaw#17) |
| glm-5.2 | #13 | openclaw#16 | Arena 0.035 (openclaw#20) |
| grok-4.6 | openclaw#20 | openclaw#21 | Arena 0.013 (openclaw#25) |
| grok-4.5 | openclaw#19 | openclaw#22 | Arena 0.012 (openclaw#26) |
| glm-5.3-flash | openclaw#23 | openclaw#28 | Arena -0.004 (openclaw#32) |
| gpt-5.6-luna | openclaw#25 | openclaw#30 | Arena -0.012 (openclaw#35) |
| gemini-3.7-flash | openclaw#26 | openclaw#31 | Arena -0.015 (openclaw#36) |
| qwen3.8-27b | openclaw#27 | openclaw#32 | Arena -0.017 (openclaw#37) |
| muse-spark-1.2 | openclaw#28 | openclaw#33 | Arena -0.033 (openclaw#38) |
| muse-spark-1.1 | openclaw#29 | openclaw#34 | Arena -0.049 (openclaw#39) |
| qwen3.7-max | openclaw#30 | openclaw#35 | Arena -0.051 (openclaw#40) |
| hy3 | openclaw#31 | openclaw#36 | Arena -0.054 (openclaw#41) |
| minimax-m3 | openclaw#34 | openclaw#37 | Arena -0.069 (openclaw#42) |
| inkling-small | openclaw#38 | openclaw#43 | Arena -0.103 (openclaw#47) |
| inkling | openclaw#39 | openclaw#44 | Arena -0.109 (openclaw#48) |
| mistral-medium-3.5 | openclaw#40 | openclaw#45 | Arena -0.124 (openclaw#49) |

29 usage-ranked entries also move; see the diff.

## Gone or deprecated

- ling-3.0-flash-fin: no host serves it
- ling-3.0-flash-vl: no host serves it
- ling-3.0-flash-sante: no host serves it
- kimi-k2.6: no Arena score and no OpenRouter usage in the window

## Suggested list

<details><summary>85 models</summary>

| # | model | signal |
| --- | --- | --- |
| 1 | claude-fable-5.1 | Arena 0.143 (#1) |
| 2 | claude-opus-5.5 | Arena 0.138 (#2) |
| 3 | claude-sonnet-5.5 | Arena 0.125 (#3) |
| 4 | gpt-6-astra | Arena 0.123 (#4) |
| 5 | gpt-6.1-sol | Arena 0.112 (#5) |
| 6 | gpt-6-sol | Arena 0.097 (#6) |
| 7 | claude-opus-5 | Arena 0.087 (#7) |
| 8 | claude-fable-5 | Arena 0.082 (#8) |
| 9 | gpt-5.6-sol | Arena 0.065 (#12) |
| 10 | claude-sonnet-5 | Arena 0.044 (#13) |
| 11 | kimi-k3 | Arena 0.042 (openclaw#14) |
| 12 | grok-4.7 | Arena 0.040 (openclaw#16) |
| 13 | deepseek-v4.1-flash | Arena 0.040 (openclaw#17) |
| 14 | muse-spark-1.3 | Arena 0.040 (openclaw#18) |
| 15 | hy4-preview | Arena 0.040 (openclaw#19) |
| 16 | glm-5.2 | Arena 0.035 (openclaw#20) |
| 17 | gemini-3.8-flash | Arena 0.030 (openclaw#21) |
| 18 | qwen3.8-max | Arena 0.025 (openclaw#22) |
| 19 | glm-5.3 | Arena 0.024 (openclaw#23) |
| 20 | gpt-6-luna | Arena 0.014 (openclaw#24) |
| 21 | grok-4.6 | Arena 0.013 (openclaw#25) |
| 22 | grok-4.5 | Arena 0.012 (openclaw#26) |
| 23 | deepseek-v4-pro | Arena 0.012 (openclaw#27) |
| 24 | gpt-5.6 | Arena 0.011 (openclaw#28) via gpt-5.4 |
| 25 | gpt-5.4 | Arena 0.011 (openclaw#28) |
| 26 | step-5-preview | Arena 0.005 (openclaw#30) |
| 27 | gpt-5.6-terra | Arena 0.004 (openclaw#31) |
| 28 | glm-5.3-flash | Arena -0.004 (openclaw#32) |
| 29 | mimo-v2.6-flash | Arena -0.006 (openclaw#33) |
| 30 | gpt-5.6-luna | Arena -0.012 (openclaw#35) |
| 31 | gemini-3.7-flash | Arena -0.015 (openclaw#36) |
| 32 | qwen3.8-27b | Arena -0.017 (openclaw#37) |
| 33 | muse-spark-1.2 | Arena -0.033 (openclaw#38) |
| 34 | muse-spark-1.1 | Arena -0.049 (openclaw#39) |
| 35 | qwen3.7-max | Arena -0.051 (openclaw#40) |
| 36 | hy3 | Arena -0.054 (openclaw#41) |
| 37 | minimax-m3 | Arena -0.069 (openclaw#42) |
| 38 | qwen3.7-plus | Arena -0.072 (openclaw#43) |
| 39 | mimo-v2.6-pro | Arena -0.075 (openclaw#44) via mimo-v2.5-pro |
| 40 | mimo-v2.5-pro | Arena -0.075 (openclaw#44) |
| 41 | gemini-3.6-flash | Arena -0.077 (openclaw#45) |
| 42 | gemini-3.1-pro-preview | Arena -0.077 (openclaw#46) |
| 43 | inkling-small | Arena -0.103 (openclaw#47) |
| 44 | inkling | Arena -0.109 (openclaw#48) |
| 45 | mistral-medium-3.5 | Arena -0.124 (openclaw#49) |
| 46 | solar-pro4 | Arena -0.159 (openclaw#50) |
| 47 | space-bunny-alpha | OpenRouter 56.7T |
| 48 | deepseek-v4-flash | OpenRouter 53.3T |
| 49 | nemotron-3-ultra-550b-a55b | OpenRouter 21.1T |
| 50 | mimo-v2.5 | OpenRouter 18.9T |
| 51 | laguna-s-2.1 | OpenRouter 4.6T |
| 52 | gemini-3-flash-preview | OpenRouter 3.4T |
| 53 | ling-3-flash-fin | OpenRouter 3.4T |
| 54 | gemini-2.5-flash-lite | OpenRouter 3.0T |
| 55 | nemotron-3.5-lightning | OpenRouter 2.7T |
| 56 | gpt-oss-120b | OpenRouter 2.5T |
| 57 | dots-3-note-preview | OpenRouter 2.4T |
| 58 | gemini-3.1-flash-lite | OpenRouter 2.1T |
| 59 | gemini-2.5-flash | OpenRouter 2.0T |
| 60 | qwen3.8-flash | OpenRouter 1.8T |
| 61 | gemma-4-31b | OpenRouter 1.7T |
| 62 | claude-sonnet-4.6 | OpenRouter 1.4T |
| 63 | deepseek-v3.2 | OpenRouter 1.4T |
| 64 | qwen3.7-flash | OpenRouter 1.4T |
| 65 | ling-3-flash-sante | OpenRouter 1.2T |
| 66 | nemotron-3-super-120b-a12b | OpenRouter 1.2T |
| 67 | nex-n2.5-pro | OpenRouter 1.1T |
| 68 | ling-3-flash-vl | OpenRouter 1.0T |
| 69 | gpt-6-luna-pro | OpenRouter 853B |
| 70 | gemma-4-26b-a4b | OpenRouter 845B |
| 71 | gpt-5.6-luna-pro | OpenRouter 566B |
| 72 | solar-mini4 | OpenRouter 510B |
| 73 | deepseek-v4-flash-vision-exp | OpenRouter 430B |
| 74 | mistral-nemo | OpenRouter 384B |
| 75 | ling-3.1-flash | OpenRouter 298B |
| 76 | glm-5.3-flashx | OpenRouter 187B |
| 77 | gpt-oss-20b | OpenRouter 127B |
| 78 | gemini-3.5-flash-lite | OpenRouter 124B |
| 79 | minimax-m2.7 | OpenRouter 113B |
| 80 | gpt-4o-mini | OpenRouter 89B |
| 81 | claude-haiku-5.5 | OpenRouter 82B via claude-haiku-4.5 |
| 82 | claude-haiku-4.5 | OpenRouter 82B |
| 83 | claude-opus-4.7 | OpenRouter 55B |
| 84 | step-3.7-flash | OpenRouter 50B |
| 85 | claude-sonnet-4.5 | OpenRouter 46B |

</details>

```diff
--- a/../../../../../../tmp/recprobe/list-20260927.json
+++ b/../../../../../../tmp/recprobe/list-20260927.json
@@ -1,80 +1,87 @@
 [
   "claude-fable-5.1",
-  "gpt-6-astra",
   "claude-opus-5.5",
+  "claude-sonnet-5.5",
+  "gpt-6-astra",
+  "gpt-6.1-sol",
+  "gpt-6-sol",
   "claude-opus-5",
   "claude-fable-5",
-  "gpt-6-sol",
   "gpt-5.6-sol",
   "claude-sonnet-5",
   "kimi-k3",
-  "hy4-preview",
-  "gemini-3.8-flash",
+  "grok-4.7",
   "deepseek-v4.1-flash",
-  "glm-5.2",
   "muse-spark-1.3",
-  "grok-4.7",
-  "deepseek-v4-pro",
-  "glm-5.3",
+  "hy4-preview",
+  "glm-5.2",
+  "gemini-3.8-flash",
   "qwen3.8-max",
-  "grok-4.5",
+  "glm-5.3",
+  "gpt-6-luna",
   "grok-4.6",
-  "gpt-5.6-terra",
+  "grok-4.5",
+  "deepseek-v4-pro",
+  "gpt-5.6",
   "gpt-5.4",
+  "step-5-preview",
+  "gpt-5.6-terra",
   "glm-5.3-flash",
-  "gpt-6-luna",
+  "mimo-v2.6-flash",
   "gpt-5.6-luna",
   "gemini-3.7-flash",
   "qwen3.8-27b",
   "muse-spark-1.2",
   "muse-spark-1.1",
   "qwen3.7-max",
   "hy3",
-  "mimo-v2.6-pro",
-  "mimo-v2.5-pro",
   "minimax-m3",
-  "gemini-3.1-pro-preview",
   "qwen3.7-plus",
+  "mimo-v2.6-pro",
+  "mimo-v2.5-pro",
   "gemini-3.6-flash",
+  "gemini-3.1-pro-preview",
   "inkling-small",
   "inkling",
   "mistral-medium-3.5",
+  "solar-pro4",
+  "space-bunny-alpha",
   "deepseek-v4-flash",
-  "mimo-v2.5",
   "nemotron-3-ultra-550b-a55b",
-  "space-bunny-alpha",
-  "solar-pro4",
+  "mimo-v2.5",
   "laguna-s-2.1",
-  "mimo-v2.6-flash",
-  "ling-3.0-flash-fin",
   "gemini-3-flash-preview",
-  "nemotron-3.5-lightning",
+  "ling-3-flash-fin",
   "gemini-2.5-flash-lite",
-  "claude-sonnet-4.6",
+  "nemotron-3.5-lightning",
   "gpt-oss-120b",
-  "gemini-2.5-flash",
-  "gemini-3.1-flash-lite",
   "dots-3-note-preview",
-  "deepseek-v3.2",
-  "gemma-4-31b",
+  "gemini-3.1-flash-lite",
+  "gemini-2.5-flash",
   "qwen3.8-flash",
+  "gemma-4-31b",
+  "claude-sonnet-4.6",
+  "deepseek-v3.2",
+  "qwen3.7-flash",
+  "ling-3-flash-sante",
   "nemotron-3-super-120b-a12b",
+  "nex-n2.5-pro",
+  "ling-3-flash-vl",
+  "gpt-6-luna-pro",
   "gemma-4-26b-a4b",
   "gpt-5.6-luna-pro",
-  "qwen3.7-flash",
-  "ling-3.0-flash-vl",
-  "minimax-m2.7",
+  "solar-mini4",
   "deepseek-v4-flash-vision-exp",
-  "gpt-oss-20b",
-  "ling-3.0-flash-sante",
-  "step-3.7-flash",
-  "claude-haiku-4.5",
   "mistral-nemo",
-  "gpt-4o-mini",
+  "ling-3.1-flash",
   "glm-5.3-flashx",
+  "gpt-oss-20b",
   "gemini-3.5-flash-lite",
-  "gpt-6-luna-pro",
+  "minimax-m2.7",
+  "gpt-4o-mini",
+  "claude-haiku-5.5",
+  "claude-haiku-4.5",
   "claude-opus-4.7",
-  "claude-sonnet-4.5",
-  "kimi-k2.6"
+  "step-3.7-flash",
+  "claude-sonnet-4.5"
 ]
```

</details>

## Merge danger

This is a two-way door: it adds one new dev script and its test, writes no files, and is never wired into CI or publishing. A revert removes it completely. If it is wrong, the impact is limited to a misleading suggestion report that a human reviews before editing the list.

Co-authored-by: Ayaan Zaidi <[email protected]>
amittell pushed a commit that referenced this pull request Nov 25, 2026
…on (openclaw#204437)

## Result

The scheduled live job "Verify live agent prompt prefix reuse" passes again. It has failed on every scheduled run since 2026-11-17, while the real OpenAI cache held: after a reopen, the uncached tokens are the same as before openclaw#200163.

## Cause

openclaw#200163 (1fa849c) stopped sending reasoning item IDs next to encrypted reasoning on cold replay, to fix `item_conflict`. A warm continuation still inherits the stored output items, IDs included. So across a reopen, history item 2 changes from `{id, type, summary, encrypted_content}` to `{type, summary, encrypted_content}`. The live gate reported exactly this on every run since 11-17:

```
openai release turn 4: prefix changed segment=history[2] path=$.keys[2]   ("id" -> "summary")
```

IDs render no model tokens. openclaw#200163 changed the transport unit test to ignore reasoning envelopes, but the release gate (`embedded-agent-runner.cache.test-support.ts`) kept its own copy of the rule that ignored only function-call and assistant-message envelopes. Three tests had three copies of the rule, and they diverged.

## Change

- `omitResponsesReplayEnvelopes` in `scripts/e2e/lib/anthropic-cache/prefix-stability.mts`, the owner of prefix snapshots, is now the one definition of token-free Responses envelopes: `id` and `status` on function calls, reasoning items and assistant messages.
- The release gate, the transport history-prefix test and the cold-prefix test all use it. Their local copies are deleted.
- No production code changes. The wire shape from openclaw#200163 stays, so its `item_conflict` fix is untouched.

## Evidence

Real OpenAI API (`gpt-5.6-luna`), the release prompt-prefix scenario: 3 warm turns, then a reopen on turn 4, 3 requests per turn. Per-request usage comes from the scenario's own cache diagnostics:

| Request | Base `89d07fe5` (parent of openclaw#200163): cacheRead / prompt, uncached | `main` b4cc3bc, gate ignoring reasoning IDs: cacheRead / prompt, uncached |
|---|---|---|
| turn 3 #7 | 96,709 / 97,116, **407** | 96,587 / 96,994, **407** |
| turn 3 #8 | 96,881 / 104,554, 7,673 | 96,759 / 104,431, 7,672 |
| turn 3 #9 | 104,551 / 111,983, 7,432 | 104,428 / 111,860, 7,432 |
| **turn 4 (reopen) #10** | 111,980 / 112,191, **211** | 111,857 / 112,068, **211** |
| turn 4 #11 | 112,152 / 119,629, 7,477 | 112,029 / 119,506, 7,477 |
| turn 4 #12 | 119,626 / 127,058, 7,432 | 119,503 / 126,935, 7,432 |

The reopen request reuses the whole previous prompt in both arms, so the retry prefix is fully cached. The scenario's own check (each request reuses at least 80% of the preceding prompt) passes in both arms.

- The same scenario with the unchanged gate on `main` fails locally with the CI signature. On this head it passes (OpenAI).
- `anthropic-cache-prefix-stability.test.ts`: a new case checks that a warm continuation and its cold replay give equal snapshots, and that changed ciphertext still fails at `history[1]`. 11 passed. `openai-responses-client.history-prefix.test.ts` 8 passed, `embedded-agent-runner.responses-cold-prefix.test.ts` 10 passed.
- Real-API dispatch of the scheduled live workflow on this branch: https://github.com/openclaw/openclaw/actions/runs/45338721403, `validate_release_live_cache` passed.
- New unit cases: changed function-call arguments, call ids and assistant content still fail at the changed index; the projection strips only `id` and `status`.

Co-authored-by: Ayaan Zaidi <[email protected]>
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.

2 participants