Repository navigation
fix: standalone session resets stall during thinking lookup - #143281
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 1:12 PM ET / 17:12 UTC. ClawSweeper reviewWhat this changesDefers model-derived thinking and reasoning settings until needed so standalone session resets can acknowledge or reject commands without that lookup. Merge readiness✅ Ready for maintainer review Keep open: the reset dependency remains on current main and in the latest release. This focused repair addresses it without an identified correctness defect; the maintainer-protected PR remains a useful landing candidate. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s reply pipeline receives chat commands and prepares session and model settings. Reset commands can finish at command dispatch, while continuing conversations pass the resolved settings to the model turn. flowchart TD
A[Incoming chat command] --> B[Session and directive preparation]
B --> C[Reset command handler]
C --> D[Authorized reset or denial]
C --> E[Continuing command or conversation]
E --> F[Lazy thinking and reasoning settings]
F --> G[Command response or model turn]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +68, Tests +126, Docs +4. Total +198 across 24 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep reset handling independent of unnecessary model defaults while retaining one shared settings resolver for commands and continuing model turns. Do we have a high-confidence way to reproduce the issue? Yes, from source: an unavailable thinking catalog can reject directive preparation before standalone reset dispatch on current main. The PR supplies a deterministic fault-injection regression; this review did not execute it. Is this the best way to solve the issue? Yes. Deferring the paired settings calculation at its shared owner removes the unnecessary dependency without duplicating reset handling or changing configuration precedence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d9b899649800. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Closes #143252
Related: #143189
What Problem This Solves
Fixes an issue where users sending a standalone
/newor/resetcould wait for thinking-catalog discovery before receiving an acknowledgement or authorization denial. The existing Discord native reset flow exposed this on a cold source checkout: its first case exceeded the unchanged 120-second deadline.Why This Change Was Made
Thinking and reasoning defaults now resolve together through one lazy owner, consumed by command handlers or the continuing model turn. The existing reset handler runs before that resolution and before loading the general command handlers. Ordinary and native-slash callers share the resolver; selected-model, explicit-setting, authorization, ACP and fallback behavior remain at their existing owners.
Earlier model-selection validation is unchanged and can still load a catalog for some wildcard allowlists. This repair removes the measured default-thinking dependency; it does not promise that all reset configurations are catalog-independent.
User Impact
Standalone reset acknowledgements and denials no longer require model-derived thinking and reasoning defaults. Follow-up text, status and thinking controls, compaction, and ordinary turns retain their configured settings. No configuration, schema, storage, protocol or public SDK change is introduced.
Evidence
The original 16-case Discord reset suite passed with unchanged assertions and timeouts; the final cold run's first
/newcase completed in 8.1 seconds. These are source-test observations, not a packaged-production latency benchmark.Regression-only changes on unchanged main fail three standalone/denied-reset cases with
thinking catalog unavailable. The/new take notescontrol still reaches capability resolution; the repaired trigger suite passes all 22 cases.The producer/consumer group passes 276 cases across 10 suites, covering selected-model defaults, explicit and unauthorized reasoning settings, native slash dispatch and affected command paths.
All 12 fallback cases pass after the final selected-model correction. The wildcard-policy preservation case also passes on original main and detects using the filtered primary's defaults instead of the selected fallback's defaults.
The final complete changed-file gate, production build and fresh independent P0–P2 review pass. Earlier targeted proof also includes 34 fixture/catalog-policy cases.
Final E2E passes all 23 selected cases: 22 trigger cases and the existing isolated-Gateway replacement turn. The latter verifies cancellation, a second preparation hook, a second model request and preserved
/newfollow-up text. One unrelated shutdown sibling was excluded. The harness uses a local synthetic model server; no external provider live proof is claimed.