CoT-Factory: Synthesizing the Missing Reasoning in Agent Trajectories
Abstract
Domain fit: AI-adjacent · Paper appears method- or tooling-adjacent to AI workflows with partial ecosystem coverage.
Progress in long-horizon agents depends on scalable, high-quality interaction trajectories. However, trajectories generated by proprietary models typically lack accessible internal reasoning, while human interaction traces lack explicit chain-of-thought (CoT), limiting the reuse of existing data for agent training and iterative improvement. To unlock this underutilized supervision, we introduce CoT-Factory, a framework for training specialized CoT synthesis models that reconstruct reasoning from recorded histories and target actions without rebuilding or replaying interaction environments. Specifically, we adapt Tree-SFT to reduce redundant history computation and enable scalable training of synthesis models. Turning to the sampling stage, we introduce a new structured quality control scheme to improve reasoning quality, alongside action-conditioned guidance to improve action compatibility. On Terminal-Bench 2.1, our method improves Qwen3.5-4B to an average success rate of 26.96%, approaching the ideal upper bound of 28.46% achieved with original CoT. Across multiple agent benchmarks, our method consistently outperforms the compared CoT synthesis methods. These results demonstrate that CoT-Factory converts existing action trajectories into effective reasoning supervision, advancing inverse CoT synthesis for long-horizon agent training.
Results and benchmarks
Progress in long-horizon agents depends on scalable, high-quality interaction trajectories.
| Task | Dataset | Metric | Value | Source |
|---|---|---|---|---|
| Agentic tool use | Forward | pass@8 | 73.73 | paper-derived |
| Agentic tool use | Trace Inversion | pass@8 | 82.53 | paper-derived |
| Agentic tool use | RLT | pass@8 | 65.97 | paper-derived |
Audit each benchmark finding before selecting an implementation path.
Implementation
No direct implementation yet
Maintained implementation evidence is not confirmed for this paper yet.
Use the implementation status and reproduction sections for the current action plan.
No verified maintained repo yet
There is no verified maintained implementation yet. Use this baseline plan to decide whether to prototype now or defer.
- No direct maintained implementation was found. Use the paper PDF and citation graph to design a baseline reproduction.
- Track assumptions and missing details in an experiment log before coding.
Time to first repro: a few days
Recommendation evidence is currently too limited for a maintained-repo choice. Use Implementation Status and Reproduction Path for a practical baseline plan.
- Estimate is based on paper-only reproduction flow
Reproduction readiness
No repo
No verified implementation available
- No maintained repository has been identified for this paper. Check adjacent implementations or HF artifacts below.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Hugging Face artifacts
No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.
Models
Datasets
Spaces
Tip: start with models, then check datasets and spaces if you need evaluation data or demos.
Research context
Tasks
Agentic tool use
Methods
Agentic systems
Domains
AI Agents
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.