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.