Repository navigation
fix: Talk falls back to a supported thinking level instead of failing - #194184
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. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherTalk 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +21, Tests +72, Other +2. Total +95 across 8 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 6, 2026, 7:14 PM ET / November 7, 2026, 00:14 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
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
offcase returns before the agent executes.off→low, supportedlow/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'.git diff --checkpass.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 authorizedopencode-go/grok-4.7target and the same question. Its current live-advertised ladder excludesoff; both overlays pin that same ladder to align provider metadata across builds.Thinking level "off" is not supported for opencode-go/grok-4.7, zero model tokens.TALK_CONSULT_OK_194184.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
offforanthropic/claude-opus-5-5. No production log excerpt was captured. The stock-versus-patched admission results above independently reproduce the rejection.