Repository navigation
fix(agents): read the published model catalog owner from session_status - #130277
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 26, 2026, 3:55 PM ET / 19:55 UTC. ClawSweeper reviewWhat this changesThe PR makes session-status model validation and status-card catalog reads use the Gateway’s currently published model-catalog generation after a configuration republish. Merge readinessKeep open. Current main still uses the exact catalog-owner read that rejects a replaced config; this PR switches the three session-status reads to the established published-owner contract. The branch is behind main and needs a rebase plus exact-head CI before merge. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherSession status is an agent tool that reads session configuration and model-catalog facts to return a diagnostic status card or apply a model override. It receives the admitted run configuration and then consults the lifecycle-owned catalog before producing the tool result. flowchart LR
A[Admitted agent run] --> B[Session status tool]
B --> C[Session and model request]
C --> D[Catalog owner lookup]
D --> E[Published catalog generation]
E --> F[Status card or model update]
G[Gateway config republish] --> E
Before merge
Agent review detailsSecurityNone. PR surfaceSource 0, Tests +5. Total +5 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase onto current main, retain the three published-owner reads, and land once the focused agent-runtime checks pass on the rebased head. Do we have a high-confidence way to reproduce the issue? Yes—source establishes the path: current main uses the exact loader, which rejects a replacement generation, while the existing catalog tests establish the replacement condition. The focused session-status test was not executed in this read-only review. Is this the best way to solve the issue? Yes. The PR reuses the catalog module’s explicit published-owner contract rather than adding a retry or fallback, covering each affected session-status read. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c3ea9775ca7c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
5aa47b6 to
c866eda
Compare
|
Land-ready refresh:
Verification:
No behavior-changing push followed the fresh ClawSweeper review, so its documented mechanical-rebase exemption applies and no re-review was requested. Post-green drift note: |
* origin/main: (26 commits) fix(plugins): preserve registry epoch on activation rollback (#129232) refactor(plugins): make discovery invocation-owned (#130486) feat(ui): save appearance preferences per user profile (#130340) fix: Buzz bots recover relay stalls and reject revoked senders (#130467) fix(code-mode): serialize catalog handles nested in final values (#130276) fix(webchat): CLI skill and harness-injected turns render as operator-sent messages (#130427) fix(agents): read the published model catalog owner from session_status (#130277) fix(channels): preserve long presentation text (#130368) fix(agents): route CLI bootstrap truncation notice into the system prompt (#130325) refactor(plugins): unify setup registration and artifact selection (#130474) fix(memory): prevent forgotten session content from returning (#130451) refactor(outbound): consolidate transport completion (#130460) fix(workers): protect in-flight workspace manifests from concurrent retention (#130449) fix(portals): keep worker previews reachable and owned by the active environment (#130434) fix(config): keep core channels keys in the generated config schema (#120736) chore(deps): refresh dependencies after seven-day cooldown (#130296) fix(agents): remind exec models to quote shell metacharacters (#125485) fix(auth): honor shared-store ownership in temp-state exec and agent deletion (#130437) fix(openshell): preserve file writes during concurrent mirror commands (#130447) fix(workers): report full nodes as at capacity, not offline (#130445) ...
…us (openclaw#130277) Co-authored-by: VACInc <[email protected]>
What Problem This Solves
session_statusfails withprepared model catalog owner config was replaced during the read (<agentDir>)whenever the Gateway has republished its runtime config since the current run was admitted (config edit, skills hot-reload, plugin reload). The tool passes the run's capturedcfgtoloadPreparedModelCatalog({ readOnly: true }), which resolves the owner under theexactconfig policy and throws on any generation mismatch. Nothing retries, so the model gets a hard tool error for the rest of that run.Seen 18 times in one operator's transcripts (Aug 2–26, 2026):
session_status, nestedsession_statusfrom code mode, andsessions_spawn.Why This Change Was Made
session_statusis a turn-path read that wants the currently published catalog generation, not a catalog prepared from a stale run snapshot. The module already exposes that contract asloadPublishedPreparedModelCatalog(the same owner the Gateway uses after a config reload, #112026). The tool's three read-only reads now use it; no new fallback path.Related: #127284 applies the same tolerance to the thinking-catalog lookup.
sessions_spawn(src/agents/subagents/spawn/subagent-spawn-child-plan.ts) hits the same class and is left as a follow-up.User Impact
session_statuskeeps working after a mid-run Gateway config republish instead of erroring until the next run.Evidence
src/agents/openclaw-tools.session-status.test.tsmock now makes the exact loader throw the replaced-config error and serves the catalog from the published loader; the suite fails onmainand passes with the fix (75 passed).Worked on by: