Skip to content

fix: standalone session resets stall during thinking lookup - #143281

Merged
steipete merged 1 commit into
mainfrom
codex/fix-reset-thinking-discovery-143252
Sep 9, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-reset-thinking-discovery-143252

Conversation

@steipete

@steipete steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Closes #143252
Related: #143189

What Problem This Solves

Fixes an issue where users sending a standalone /new or /reset could 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 /new case 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 notes control 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 /new follow-up text. One unrelated shutdown sibling was excluded. The harness uses a local synthetic model server; no external provider live proof is claimed.

@clawsweeper

clawsweeper Bot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@steipete
steipete marked this pull request as ready for review September 9, 2026 17:05
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M maintainer Maintainer-authored PR labels Sep 9, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 9, 2026
@clawsweeper

clawsweeper Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 9, 2026, 1:12 PM ET / 17:12 UTC.

ClawSweeper review

What this changes

Defers 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
Reviewed head: a674b7acc8de4736cc3a2310d49820e5a73a9d37

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with meaningful regression coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored exemption applies. Supplied evidence exercises reset dispatch, catalog failure, and continuing turns through source tests and an isolated Gateway with a synthetic model server; it does not claim packaged-production latency or external-provider proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored exemption applies. Supplied evidence exercises reset dispatch, catalog failure, and continuing turns through source tests and an isolated Gateway with a synthetic model server; it does not claim packaged-production latency or external-provider proof.
Evidence reviewed 9 items Introduced change and reset ordering: The pinned merge-base-to-head diff moves model-level resolution and general handler loading after the existing reset handler; reset authorization and response construction remain unchanged.
Current main still contains the dependency: Current main awaits default thinking during directive preparation and can then await default reasoning, before reset dispatch. The central repair is still necessary.
Latest release comparison: The latest supplied release, v2026.9.3, also contains eager default-thinking resolution and the subsequent reasoning-default decision.
Findings None None.
Security None None.

How this fits together

OpenClaw’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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +68, Tests +126, Docs +4. Total +198 across 24 files.

View PR surface stats
Area Files Added Removed Net
Source 11 137 69 +68
Tests 12 195 69 +126
Docs 1 4 0 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 24 336 138 +198

Review metrics

Metric Value Why it matters
Production and test growth Production +68 net lines; tests and test support +126 Production growth introduces one shared lazy settings owner; test growth protects reset independence and selected-model behavior.

Technical review

Best 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.

Labels

Label changes:

  • add P2: This repairs a source-proven session-command delay with bounded impact; the reported timing measurements are from cold source tests.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored exemption applies. Supplied evidence exercises reset dispatch, catalog failure, and continuing turns through source tests and an isolated Gateway with a synthetic model server; it does not claim packaged-production latency or external-provider proof.

Label justifications:

  • P2: This repairs a source-proven session-command delay with bounded impact; the reported timing measurements are from cold source tests.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored exemption applies. Supplied evidence exercises reset dispatch, catalog failure, and continuing turns through source tests and an isolated Gateway with a synthetic model server; it does not claim packaged-production latency or external-provider proof.

Evidence

What I checked:

  • Introduced change and reset ordering: The pinned merge-base-to-head diff moves model-level resolution and general handler loading after the existing reset handler; reset authorization and response construction remain unchanged. (src/auto-reply/reply/commands-core.ts:64, a674b7acc8de)
  • Current main still contains the dependency: Current main awaits default thinking during directive preparation and can then await default reasoning, before reset dispatch. The central repair is still necessary. (src/auto-reply/reply/get-reply-directives.ts:547, d9b899649800)
  • Latest release comparison: The latest supplied release, v2026.9.3, also contains eager default-thinking resolution and the subsequent reasoning-default decision. (src/auto-reply/reply/get-reply-directives.ts:547, 1391f7cd2d40)
  • Shared settings owner and preserved policy: The new resolver memoizes thinking and reasoning together and preserves explicit-setting guards. The existing model-selection owner supplies configuration precedence and always returns a thinking level, making the removed trailing configured-default fallback redundant. These are OpenClaw-owned contracts; the change does not establish dependency on an external Codex implementation. (src/auto-reply/reply/reply-model-levels.ts:34, a674b7acc8de)
  • Fallback selection preservation: The fallback-probe path resolves defaults using the model selected by policy. Added coverage distinguishes that selection from a filtered primary and retains explicit thinking and reasoning settings. (src/auto-reply/reply/get-reply.ts:1170, a674b7acc8de)
  • Regression coverage and reported validation: Inspected tests inject a failing thinking catalog, verify standalone acknowledgements and denied resets avoid it, and verify follow-up text still reaches capability resolution. The supplied PR body reports baseline failures, repaired trigger and fallback suites, and an isolated-Gateway replacement turn with a synthetic model server; these are author-reported results, not tests executed during this read-only review. (src/auto-reply/reply.triggers.trigger-handling.e2e.test.ts:445, a674b7acc8de)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • EricCai: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 0720f31 into main Sep 9, 2026
247 of 248 checks passed
@steipete
steipete deleted the codex/fix-reset-thinking-discovery-143252 branch September 9, 2026 17:38
@steipete

steipete commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standalone session resets wait for thinking catalog discovery

1 participant