Skip to content

fix: suppress thinking-mode output in ReviewPlanTask#159

Merged
neoneye merged 1 commit intoPlanExeOrg:mainfrom
VoynichLabs:fix/review-plan-thinking-output
Mar 7, 2026
Merged

fix: suppress thinking-mode output in ReviewPlanTask#159
neoneye merged 1 commit intoPlanExeOrg:mainfrom
VoynichLabs:fix/review-plan-thinking-output

Conversation

@82deutschmark
Copy link
Collaborator

Problem

ReviewPlanTask fails with Could not extract json string from output: Thinking Process:\n\n1. Analyze the Request:...

Qwen 3.5-35B-A3B enters chain-of-thought reasoning mode on complex multi-turn prompts and outputs a large Thinking Process: block before generating JSON. This exhausts the num_output token budget, leaving no tokens for the actual JSON response. JSON extraction finds no JSON in the output and raises ValueError.

This is a different failure class from the Pydantic tail-field truncation fixed in PRs #153/#155/#156. Those were missing required fields. This is missing JSON entirely — the model's reasoning trace consumed the entire output budget.

Fix

One line added to REVIEW_PLAN_SYSTEM_PROMPT:

Output ONLY the JSON object. Do not include any thinking process, reasoning steps, or analysis before the JSON. Begin your response immediately with the opening brace {.

Changes

  • worker_plan/worker_plan_internal/plan/review_plan.py — 2 lines

This PR intentionally changes only 1 file.

Qwen 3.5-35B-A3B enters chain-of-thought reasoning mode on complex
multi-turn prompts, outputting a large 'Thinking Process:' block
before the JSON. This exhausts the num_output token budget, leaving
no tokens for the actual JSON response. JSON extraction then fails
with 'Could not extract json string from output'.

Fix: explicit instruction to output ONLY the JSON object without
any reasoning preamble.

Confirmed failure: ReviewPlanTask failed 2026-03-07 01:05 EST
on Mac Mini M4 Pro 64GB, Qwen 3.5-35B-A3B, num_output=8192.
@neoneye neoneye merged commit 4a36c5d into PlanExeOrg:main Mar 7, 2026
3 checks passed
@neoneye neoneye deleted the fix/review-plan-thinking-output branch March 7, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants