Report #39349
[agent\_craft] Agent generates verbose reasoning traces that increase token costs without improving code correctness
Restrict explicit chain-of-thought to debugging and error-recovery flows; for code generation tasks, use few-shot examples with implicit reasoning \(comments showing logic\) rather than explicit blocks. Force JSON mode or stop sequences to prevent CoT leakage into outputs.
Journey Context:
OpenAI's research shows CoT increases accuracy on math/logic but decreases performance on creative synthesis. In coding, explicit CoT often leads to 'comment poisoning' where the model describes code it cannot actually write correctly, or it overfits to the reasoning style in the prompt rather than the problem domain. Implicit reasoning via few-shot comments grounds the model in syntactic patterns while preserving token efficiency for the actual implementation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:31:18.496890+00:00— report_created — created