fix(sessions): honor explicit default model pins#85643
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 15, 2026, 10:05 AM ET / 14:05 UTC. Summary PR surface: Source +269, Tests +1114, Docs 0. Total +1383 across 34 files. Reproducibility: yes. Current main source shows Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land only if maintainers accept strict explicit-default pins as the supported contract; otherwise preserve legacy clear behavior and design a separate explicit pin path. Do we have a high-confidence way to reproduce the issue? Yes. Current main source shows Is this the best way to solve the issue? Unclear until maintainers decide the compatibility contract. The implementation is coherent and covers sibling paths if strict explicit-default pins are desired, but preserving legacy clear semantics is the safer alternative if that contract is not accepted. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 66079161d72a. Label changesLabel justifications:
Evidence reviewedPR surface: Source +269, Tests +1114, Docs 0. Total +1383 across 34 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: ✨ glimmer Neon Lint Imp Hatch commandComment Hatchability rules:
Rarity: ✨ glimmer. What is this egg doing here?
|
|
@clawsweeper re-review Addressed the compatibility finding without undoing the explicit-default pin behavior across the rest of the branch. What changed:
Verification:
Note: the repo-local |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
7c12035 to
0ba6718
Compare
|
@clawsweeper re-review Added redacted after-fix behavior proof for the current head. What changed in the PR body:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Corrected the PR body to use the exact The current body now validates locally with
|
|
🦞👀 Command router queued. I will update this comment with the next step. Re-review progress:
|
|
@clawsweeper re-review Refreshed the PR body proof on the current head Verification:
No source files changed in this follow-up; this only refreshes the public current-head proof. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Rebased this branch onto current Verification on the rebased head
The full GitHub check suite is rerunning automatically on this push. I did not refresh the separate local source-module |
|
@clawsweeper re-review Refreshed the Verification:
No source files changed in this follow-up; this only refreshes the public current-head proof. The remaining red |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Rebased onto current Verification on the rebased head:
I also refreshed the |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Rebased onto current Verification:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Rebased onto current This follow-up also fixed one rebased test harness regression in Verification:
No runtime source files changed in this follow-up; remaining reviewer focus should be the refreshed CI run plus the existing maintainer decision on strict explicit-default pins. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Mantis Telegram Desktop ProofSummary: Mantis captured native Telegram Desktop before/after GIFs showing the configured-default /model command acknowledgement change.
Motion-trimmed clips: |
|
@clawsweeper re-review Rebased onto current This refresh kept the branch narrow and resolved the rebase drift in the existing status/docs seams:
Verification:
No new contributor-facing blocker surfaced in this refresh; remaining reviewer focus should be the rerun CI plus the existing maintainer decision on strict explicit-default pins. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Rebased onto current This refresh kept the existing branch behavior and only resolved rebase drift against newer status/plugin-health changes on
Verification:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Rebased onto current This refresh stayed narrow. The only real rebase conflict was in Verification:
No new contributor-facing blocker surfaced in this refresh; remaining reviewer focus is still the maintainer decision on strict explicit-default pins plus the fresh CI rerun. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Rebased onto current This refresh stayed narrow and did not change branch intent. The 14-commit stack rebased cleanly onto current Verification:
No new contributor-facing blocker surfaced in this refresh; remaining reviewer focus is still the maintainer decision on strict explicit-default pins plus the fresh CI rerun on the rebased head. |
|
🦞🧹 I asked ClawSweeper to review this item again. |




Summary
/model default,session_status(model=default), andsessions.patch model:nullas the explicit clear/unpin paths.Real behavior proof
Behavior addressed: Explicit
/model <configured default>selections no longer lose user intent just because they match the configured primary; fallback policy treats them as strict user session selections, while/model defaultstill clears back to unpinned behavior.Real environment tested: Local beatrice.local source checkout at PR head
98ca4cd8b150ee0be7fcd602a01c4aed346f316con May 30, 2026. Ran a local source-module behavior probe withnode --import tsxagainst the current checkout; no channel credentials, provider API keys, live runtime files, or LaunchAgent state were used or modified.Exact steps or command run after this patch:
node --import tsx --input-type=module <<'EOF' ... EOF(local source-module behavior probe that applied an explicit configured-default selection, changed the configured primary, rendered/status, applied/model default, and rendered/statusagain)node scripts/run-vitest.mjs src/gateway/sessions-patch.test.ts src/sessions/model-overrides.test.ts src/agents/openclaw-tools.session-status.test.ts src/commands/status.summary.test.tsgit diff --checkEvidence after fix:
Terminal transcript:
Current-head refresh on June 1, 2026 at PR head
3582fabe21da45e5f1386f018480ae41fff07604:node scripts/run-vitest.mjs src/gateway/sessions-patch.test.ts src/sessions/model-overrides.test.ts src/agents/openclaw-tools.session-status.test.ts src/agents/agent-command.live-model-switch.test.tsnode --import tsx --input-type=module <<'EOF' ... EOF(minimal source-module rebase probe that confirmed the persisted explicit-default override state and/model defaultclear path without pulling in unrelated provider/plugin startup)git diff --checkObserved result after fix: The current PR head preserves an explicit configured-default selection as a user session pin,
/statusshows the pinned-session warning plusClear with: /model defaultafter the config primary changes, and/model defaultremoves the persisted override so/statusreturns to the new configured primary. The focused session/status Vitest proof also passes on the rebased head.What was not tested: No live Telegram or OpenAI provider turn was run, no channel delivery was exercised, and no live runtime files or LaunchAgent state were modified.
Current-head refresh on June 4, 2026 at PR head
44e618a93c692a8db6488a163146676c48757e6d:node scripts/run-vitest.mjs src/gateway/sessions-patch.test.ts src/sessions/model-overrides.test.ts src/agents/openclaw-tools.session-status.test.ts src/agents/agent-command.live-model-switch.test.tsnode --import tsx --input-type=module <<'EOF' ... EOF(local source-module probe that re-applied an explicit configured-default pin, switched the configured primary, rendered/status, applied/model default, and rendered/statusagain on the rebased head)git diff --check