Skip to content

fix: Talk falls back to a supported thinking level instead of failing - #194184

Merged
roboclaw-bot merged 5 commits into
openclaw:mainfrom
Marvinthebored:fix/talk-consult-thinking
Nov 16, 2026
Merged

roboclaw-bot merged 5 commits into
openclaw:mainfrom
Marvinthebored:fix/talk-consult-thinking

Conversation

@Marvinthebored

@Marvinthebored Marvinthebored commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Closes #194183

What Problem This Solves

Fixes: chat-backed Talk consultations fail before agent execution when the configured thinking preference is unsupported by the consult target model.

User Impact

Talk can consult the selected agent without requiring one global thinking setting to fit every model. Supported choices and ordinary explicit user-command validation remain unchanged.

Why This Change Was Made

The internal Talk setting is a machine-selected preference, not a user command targeting a particular model. Keep the normalization switch internal, outside the public plugin options. Mark only trusted internal Talk requests with an explicit preference for normalization, then use the existing thinking policy after the actual execution model and runtime are resolved.

Keep the original preference for per-candidate fallback normalization; do not persist the normalized value or clamp inherited session preferences.

Evidence

  • Stock admission source: 1 failed, 5 passed. The new unsupported-off case returns before the agent executes.
  • Patched admission: 6 passed. Covers unsupported off → low, supported low/high, retained original preference, inherited preferences, and ordinary explicit rejection. Command: node node_modules/vitest/vitest.mjs run --config test/vitest/vitest.infra.config.ts src/auto-reply/reply/get-reply-run.media-only.test.ts --maxWorkers=2 -t 'resolves Talk preference|validates .* thinking|does not clamp inherited thinking'.
  • Trusted request policy: 4 passed, covering explicit Talk, absent preference, unrelated internal tool, and ordinary input.
  • Chat dispatch integration: 1 passed, verifying ordinary thinking metadata stays out of command text and does not opt into normalization.
  • Scoped lint and git diff --check pass.
    AI-assisted implementation.

The 72-line allocation matches the added regression coverage. Merged current main without rewriting branch history (head 69543ab3ced6). Full Git-index test-line check passes: 6,556,085 lines / 6,556,093 ceiling (8 spare). Admission regressions rerun on this head: 6 passed. Exact-head CI is running.

Real shipped Talk consultation: stock rejects, patched returns the agent result. Both isolated Gateways used consultThinkingLevel: off, the same authorized opencode-go/grok-4.7 target and the same question. Its current live-advertised ladder excludes off; both overlays pin that same ladder to align provider metadata across builds.

  • Stock: final rejection Thinking level "off" is not supported for opencode-go/grok-4.7, zero model tokens.
  • Patched: real Grok agent lifecycle, streamed output, and final reply TALK_CONSULT_OK_194184.
  • Live proof, exact builds, requests, and redacted event excerpts. This uses the shipped legacy Talk tool-call ingress without an audio session; it proves consultation dispatch and returned result, not audio playback. The four changed production files in the tested candidate are byte-identical to this PR head.
  • The normalization switch is now in InternalReplySessionOptions, not the public plugin contract. The low-value manual fallback-helper test was removed.

Report provenance: the original report was the November 6 task brief recording three rejections of off for anthropic/claude-opus-5-5. No production log excerpt was captured. The stock-versus-patched admission results above independently reproduce the rejection.

@clawsweeper

clawsweeper Bot commented Nov 6, 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.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: S labels Nov 6, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 6, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 6, 2026
@clawsweeper

clawsweeper Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR normalizes explicit internal Talk thinking preferences against the execution model while preserving the original preference for fallback candidates.

Example: Talk uses consultThinkingLevel: off with opencode-go/grok-4.7 advertising low, medium, high, and xhigh.

  • Before: Admission returns an unsupported-thinking rejection before model execution.
  • After: The consultation runs with a supported level and returns TALK_CONSULT_OK_194184.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused, useful repair with shipped-entry-point evidence, preserved preference contracts, green exact-head gates, and no open findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): Inspected linked event excerpts from isolated real Gateways using shipped talk.client.toolCall: the patched consultation reaches opencode-go/grok-4.7 and returns TALK_CONSULT_OK_194184 with off configured against an off-excluding ladder; its changed production files match the reviewed head, and the claim excludes audio playback.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A Talk consultation fails before the agent runs when its configured thinking preference is unsupported by the selected model.
Reason: Model-aware normalization restores consultations through an existing policy without adding configuration, changing the public plugin API, or overwriting session preferences.

Merge readiness

✅ Ready for maintainer review

Keep this PR: it fixes a current Talk admission bug, resolves the earlier public-option finding, and has qualifying live proof with no actionable findings.

Priority: P2
Reviewed head: 69543ab3ced6f56ae8cef6ca3a6f8d4e021b28d3

Before merge

None.

Findings

None.

Agent review details

How this fits together

Talk forwards consultation requests through chat.send; reply admission resolves model-specific thinking settings before handing the run to the agent runner.

flowchart LR
  A[Talk consultation] --> B[Trusted chat send]
  B --> C[Internal reply options]
  C --> D[Reply admission]
  D --> E[Existing thinking policy]
  E --> F[Agent execution]
  F --> G[Consultation result]
Loading

Technical review

Best possible solution:

Merge the focused internal admission repair using the existing thinking-policy owner while preserving strict user commands and saved preferences.

Do we have a high-confidence way to reproduce the issue?

Current-main source establishes the rejection path, and the contributor supplies paired live Gateway events; no target code was executed during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete repair: classify the internal Talk preference at ingress, carry one internal option, and normalize at the existing model-aware admission boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d4d6fe725bff.

Provenance checked

  • Explicit thinking validation in reply admission keeps the original intent (512b48b: The orchestration split deliberately preserved existing validation behavior; this identifies the moved code, not its original introduction.)
  • Original thinking preference through fallback keeps the original intent (fix(agents): preserve per-turn settings and diagnostics #138695: Preserve one-turn thinking intent through queued model changes and fallback without replacing saved preferences.)
  • Talk consultation thinking override keeps the original intent (Unify thinking and fast run controls #79385: Provide realtime consultation thinking and fast overrides with one-shot runtime settings taking precedence over session defaults.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Raw commit 512b48b adds src/auto-reply/reply/get-reply-run-admission.ts:241 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 512b48bd26a3; files: src/auto-reply/reply/get-reply-run-admission.ts)

PR surface

Source +21, Tests +72, Other +2. Total +95 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 23 2 +21
Tests 3 72 0 +72
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 8 97 2 +95

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review selected no merge-risk labels.
  • remove status: 📣 needs proof: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The bug blocks Talk consultations for a specific configured preference and model-capability combination.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (1 earlier review cycle)
  • reviewed 2026-11-06T15:55:50.385Z sha 536f1f6 :: needs real behavior proof before merge. :: [P2] Keep the Talk normalization switch in the internal options contract

Reviewed November 6, 2026, 7:14 PM ET / November 7, 2026, 00:14 UTC (Revision 2).

@roboclaw-bot roboclaw-bot added the clawtributors PR from a clawtributor label Nov 6, 2026
@Marvinthebored

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Nov 7, 2026
@clawsweeper clawsweeper Bot removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 7, 2026
@Marvinthebored Marvinthebored changed the title fix: Talk consults fail with unsupported thinking preferences fix: Talk answers instead of failing when the model doesn't support the chosen thinking level Nov 9, 2026
@Marvinthebored Marvinthebored changed the title fix: Talk answers instead of failing when the model doesn't support the chosen thinking level fix: stops Talk failing when the model doesn't support the chosen thinking level Nov 9, 2026
@Marvinthebored Marvinthebored changed the title fix: stops Talk failing when the model doesn't support the chosen thinking level fix: Talk falls back to a supported thinking level instead of failing Nov 9, 2026
@sallyom sallyom self-assigned this Nov 16, 2026
@roboclaw-bot
roboclaw-bot merged commit 94e34f9 into openclaw:main Nov 16, 2026
184 of 185 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawtributors PR from a clawtributor gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S 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.

Talk consults reject unsupported machine-selected thinking levels

3 participants