RECAST: REconstruction of Chain-of-Thought via Auditable Structured Traces
Organizations: East China Normal University · Shanghai Innovation Institute · Software Engineering Institute, ECNU
Abstract
Large closed-source reasoning models expose only their final answers. The intermediate reasoning that produces those answers is hidden behind API surfaces, tool-call policies, and safety filters. Existing chain-of-thought (CoT) extraction methods assume a side channel: a visible reasoning field, a scratchpad carried through tool calls, or a signed/encrypted reasoning block. We reproduce three representative state-of-the-art extraction methods and find that, on Claude-Sonnet-5.5 accessed through the standard chat-completions interface, all three return zero CoT tokens. The failure is structural rather than a bug: the reasoning field is absent, named tool selection is rejected, free-text scratchpad arguments are filtered, and no replayable reasoning block is exposed. We therefore take a different route. We present RECAST, a reconstruction-based framework that conditions a decoder on the question and the target model's final answer, reconstructs a first-person structured rationale, cleans it, and builds SFT-ready data. To the best of our knowledge, RECAST is the first system to reconstruct CoT from frontier closed models such as Claude-Sonnet-5.5, GPT-6.1, and Gemini 3 without using hidden reasoning channels. We instantiate RECAST on Claude-Sonnet-5.5 and additionally obtain successful qualitative reconstructions on GPT-6.1 and Gemini 3 with the same answer-only protocol. The system is open-source and packaged as an agent skill: one prompt deploys it and runs the complete pipeline to produce SFT-ready CoT data. This preprint describes the system, its threat model, and a controlled artifact validation; it does not claim large-scale benchmark improvements.
Figures & tables
| Method | Required side channel | Observed on Claude-Sonnet-5.5 | CoT tokens |
|---|---|---|---|
| P3 Forced-Reasoning ( Luo et al., 2026 ) | Named/any tool_choice plus a free-text tool argument | Named tool choice rejected with HTTP 400; free-text scratchpad arguments blocked with content_filter | 0 |
| P1 EchoCoT ( Qu et al., 2026 ) | Scratchpad tool state across multiple turns | First scratchpad call blocked with content_filter ; tool invocation rate 0% | 0 |
| P2 Stealing Reasoning Traces ( Panfilov et al., 2026 ) | Signed/encrypted reasoning block to replay | No signature , encrypted_content , or reasoning_text ; source billed 9,949 completion tokens; extraction error 1.0 | 0 |
| Recast (ours) | Final answer plus an external decoder | Only the answer is required; no hidden channel | structured trace |
| Pattern | Profile | Structure and purpose |
|---|---|---|
| math_solver | math | Teacher reads the problem; student derives and verifies. For proof problems, the verifier attacks the argument for gaps. |
| socratic | logic, planning | Repeated questions on goal, constraints, assumptions, and counterexamples before solving. |
| expert_panel | science | Multiple expert roles decompose the problem, check assumptions, and converge on a solution. |
| pair_programming | code | Driver–navigator pair writes code, tests, and counterexamples. |
| red_blue | secondary | Blue team proposes a solution; red team attacks edge cases and counterexamples; a judge converges. |
| retrospective | open-ended | Solve first, then use a retrospective/PDCA cycle to surface requirements and extensions. |
| Status | Meaning and downstream handling |
|---|---|
| ok | Cleaned trace passed JSON parsing, leak checks, and length checks; used as the supervision target. |
| still_leaky | Dialogue or meta terms remain after retries; raw trace is used and the leak is recorded. |
| rejected_short | Cleaned trace is shorter than the minimum ratio; raw trace is used and the record is flagged. |
| rejected_long | Cleaned trace exceeds the maximum ratio (possible duplication); raw trace is used and the record is flagged. |
| api_error | Cleaner call failed; raw trace is used and the error is recorded. |
| Target | Assistant content |
|---|---|
| cot_answer | Cleaned CoT followed by the final answer (default). |
| cot_only | Cleaned CoT only; the answer is kept in metadata and not trained on. |
| source_only | The target model’s original answer; used as an answer-only baseline. |
| cot_plus_source | Cleaned CoT plus the original answer; used to test whether answer style adds signal beyond the reconstructed rationale. |
| Stage | Time (s) |
|---|---|
| Collect target answer | 12.8 |
| Decode reconstructed CoT | 9.9 |
| Clean trace | 8.4 |
| Extract/canonicalize answer | 2.2 |
| Build + validate SFT data | 0.2 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Profile | Primary | Secondary |
|---|---|---|---|
| MATH-500, GSM8K, AIME | math | math_solver | red_blue |
| HumanEval, MBPP, LiveCodeBench | code | pair_programming | red_blue |
| GPQA, ScienceQA | science | expert_panel | red_blue |
| BBH, LogiQA | logic | socratic | expert_panel |
| PlanBench, agent tasks | planning | socratic | retrospective |
| Open-ended writing | open_ended | retrospective | socratic |