Large language model coding agents have recently become useful for software tasks, but weaker or open-weight agents still struggle to reliably interpret user intent and execute complex multi-step workflows. This gap is especially visible in long-horizon settings, where an agent must repeatedly inspect prior outcomes, diagnose failure, and choose the next code edit under interaction constraints. It motivates a natural question: what can we do to improve the thinking process of a weak code agent? We study this question in CodeClash, a code-arena benchmark where the original work evaluates 8 commercial coding agents across 6 arenas through multi-round tournaments. Since Qwen3 Coder Plus ranks last among them, we take the open-weight Qwen3-Coder-30B as a case study and investigate how to improve it with distilled knowledge from stronger agents. Our analysis shows that Qwen3-Coder-30B is not well optimized for arena-style interaction: it frequently produces syntax and protocol-breaking errors and exhibits weak strategic adaptation across rounds. These failures are difficult to correct with vanilla instruction tuning alone, since offline SFT cannot directly verify whether a generated action is valid or beneficial. To address this, we propose ReAct SFT, which rewrites teacher trajectories into explicit [obs][thought][act] chains, and trajectoryquality weighted SFT, which reweights samples to encourage post-edit checking. ReAct SFT substantially improves strategic behavior, and our fine-tuned model outperforms the original Qwen3 Coder Plus in tournament evaluation.
Figures & tables
Figure 1: A simplified but faithful example illustrating our supervision rewriting scheme. The raw previous output is preserved in context, but the assistant-side reasoning target is rewritten from an unstructured THOUGHT into explicit [Obs][Thought][Act] fields, while preserving the original executable bash action.
Player A
Player B
Winner
Win
Lose
Tie
Primary failure side
Qwen3-30B SFT (self-play)
Qwen3-Coder-30B base
Player A
8
2
0
both
Qwen3-30B SFT (qwen-coder-plus)
Qwen3-Coder-30B base
Player B
1
4
0
mostly A
Qwen3-30B SFT (gemini-2.5-pro)
Qwen3-Coder-30B base
Player A
2
1
0
both
Table 1: Preliminary baseline comparisons at the round level, excluding abnormal rounds with outcomes (0,0,1000) , (0,1000,0) , or (1000,0,0) . Winner is determined by the higher number of round wins among valid rounds. Primary failure side indicates whether failed rounds were mainly caused by Player A, Player B, or both sides producing invalid submissions or structural runtime errors.
Player A
Player B
Winner
Win
Lose
Tie
Primary failure side
ReAct 2 turn
Qwen3 Coder 30B base
Player B
1
12
0
both
ReAct 8 turn
Qwen3 Coder 30B base
Player B
1
12
1
both
ReAct 4 turn
Qwen3 Coder 30B base
Player A
6
2
1
both
TQ-SFT
Qwen3 Coder 30B base
Player B
3
6
3
mostly B
ReAct 6 turn
TQ-SFT
Player A
11
1
2
both
TQ-SFT
Vanilla SFT (self play)
Player A
3
1
0
mostly B
Table 2: Ablation results across post-training variants in BattleSnake, excluding abnormal rounds with outcomes (0,0,1000) , (0,1000,0) , or (1000,0,0) from the Win/Lose/Tie counts. Winner is determined by the higher number of round wins among valid rounds. ‘Primary failure side‘ summarizes which side mainly caused the excluded abnormal rounds.
Player A
Player B
Winner
Win
Lose
Tie
Primary failure side
ReAct 6 turn
Qwen3 Coder 30B base
Player A
9
3
1
both
ReAct 6 turn
Qwen3 Coder Plus
Player A
12
0
0
mostly B
ReAct 6 turn
Claude 4.5
Player B
0
15
0
none
Table 3: Main tournament comparisons for the strongest model, ReAct 6-turn, excluding abnormal rounds with outcomes (0,0,1000) , (0,1000,0) , or (1000,0,0) from the Win/Lose/Tie counts. Winner is determined by the higher number of round wins among valid rounds.
Action category
Base Qwen
Qwen Coder Plus
Claude 4.5
ReAct SFT
TQ-SFT
Round / result checks (A)
1.22%
4.99%
31.75%
21.51%
9.93%
Edits-log checks (B)
0.00%
0.07%
1.67%
6.69%
0.00%
Simulation slice checks (C)
0.00%
0.40%
18.28%
0.00%
0.00%
Code structure checks (D)
6.94%
14.88%
8.08%
1.16%
0.97%
Local testing (E)
4.90%
0.35%
7.01%
11.34%
8.72%
Analysis scripts (F)
0.00%
0.29%
11.98%
9.88%
12.59%
Table 4: Partial behavioral action breakdown across representative agents in BattleSnake. Percentages denote the share of assistant bash actions assigned to the selected categories shown here, so columns do not sum to 100%. ReAct SFT shifts behavior toward round-aware diagnosis and testing, moving closer to Claude 4.5, while TQ-SFT mainly increases testing and scripted analysis associated with reliability.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 2: Correlation between error-checking and diagnosis behavior and win rate in the BattleSnake arena.
Coding tasks are typically complicated and require multiple capabilities, ranging from high-level planning to low-level implementation. While coding agents are optimized for the joint capabilities, individual capabilities such as high-level planning may have different optima and remain a major bottleneck. To address this challenge, we train a separate critic model that is specialized in high-level planning to steer the coding agent in inference. We construct SFT and DPO data to train the critic model to identify errors made by the coding agent and provide correct and clear high-level guidance without generating concrete actions. Experiments show that our fine-tuned 4B and 8B critic models significantly improve the performance of 6 larger coding agents (e.g., improving the resolved rates of GLM-4.7-Flash-30B-A3B and GPT-OSS-120B by 16.0% and 14.4% on SWE-Bench Verified). The critic model also reduces the total inference costs for some coding agents by solving tasks in fewer steps (e.g., reducing the per-example inference cost for GPT-OSS-20B from $0.07 to $0.03). Code: https://github.com/shubhamrgandhi/critic-training
We present Qwen3-Coder-Next, an open-weight language model specialized for coding agents. Qwen3-Coder-Next is an 80-billion-parameter model that activates only 3 billion parameters during inference, enabling strong coding capability with efficient inference. In this work, we explore how far strong training recipes can push the capability limits of models with small parameter footprints. To achieve this, we perform agentic training through large-scale synthesis of verifiable coding tasks paired with executable environments, allowing learning directly from environment feedback via mid-training and reinforcement learning. Across agent-centric benchmarks including SWE-Bench and Terminal-Bench, Qwen3-Coder-Next achieves competitive performance relative to its active parameter count. We release both base and instruction-tuned open-weight versions to support research and real-world coding agent development.
Code agents must both reason over long-horizon repository state and obey strict tool-use protocols. In paired Instruct/Thinking checkpoints, these capabilities are complementary but misaligned. The Instruct model is concise and tool-disciplined, whereas the Thinking model offers stronger planning and recovery behavior but often over-deliberates and degrades agent performance. We present CRANE (Constrained Reasoning Injection for Code Agents via Nullspace Editing), a training-free parameter-editing method that treats the Thinking-Instruct delta as a directional pool of candidate reasoning edits for the Instruct backbone. CRANE combines magnitude thresholding to denoise the delta, a Conservative Taylor Gate to retain edits that are jointly beneficial for reasoning transfer and tool-use preservation, and Graduated Sigmoidal Projection to suppress format-critical update directions. By merging paired Instruct and Thinking checkpoints, CRANE delivers strong gains over either individual model while preserving Instruct-level efficiency: on Roo-Eval it achieves pass1 of 66.2% (+19.5%) for Qwen3-30B-A3B and 81.5% (+8.7%) for Qwen3-Next-80B-A3B; on SWE-bench-Verified it resolves up to 14 additional instances at both scales (122/500 and 180/500); and on Terminal-Bench v2 it improves pass1/pass5 by up to 2.3%/7.8%, reaching 7.6%/17.9% and 14.8%/30.3%, respectively, consistently outperforming alternative merging strategies across all three benchmarks.
Mingzhi Zhu, Michele Merler, Raju Pavuluri +1
Rensselaer Polytechnic Institute Troy, NY 12180 · IBM Research Yorktown Heights, NY 10598