Can we enhance AI reasoning without sacrificing the reliability of coding tools? The CRANE method proves it’s possible.
A stronger reasoning model is not automatically a better coding agent. For many AI systems, the standard approach is to take a model that can reason longer, plan more carefully, and recover from mistakes, then place it inside a more complex workflow. In agentic coding, however, the workflow itself is part of the task. A coding agent must not only solve a programming task, it must read files, follow repository conventions, call tools in the right manner, obey formatting protocols, run tests, interpret failures, and stop when the work is done. If the agent calls a tool too early, ignores instructions, loops after a failed command, or keeps thinking instead of testing a fix, the extra reasoning budget can translate into worse performance, in addition to the increased cost deriving from an expanded token count.
This is the motivation behind CRANE (Constrained Reasoning Injection for Code Agents via Nullspace Editing), a model-merging approach that explores a practical question: can we give an Instruct model some of the planning and recovery strengths from a Thinking model while preserving the tool-use behavior that makes the Instruct model dependable? Rather than assuming that a single checkpoint must be trained to do everything well, CRANE takes a compositional view of open agentic systems: different checkpoints can encode different strengths, and those strengths can be combined without retraining the model or rebuilding the agent interface. CRANE treats the difference between paired Thinking and Instruct checkpoints as a pool of candidate reasoning edits. It then filters, scores, and projects those edits so that useful reasoning behavior is transferred while tool protocols remain stable. The large-scale evaluation and ablation experiments underlying CRANE were supported in part by resources provided through the NAIRR pilot and the AI Alliance/MOC/IBM Research collaboration.
The CRANE method
Modern open model families increasingly provide multiple checkpoints tuned for different behaviors from a common set of base weights. In a paired setup, an Instruct checkpoint is often tuned to be concise, protocol-following, and responsive to direct user or tool instructions. A Thinking checkpoint is tuned to spend more computation on planning, intermediate reasoning, and difficult problem solving.
On agentic coding tasks, the Thinking checkpoint may plan more, but it can also overthink. The Instruct checkpoint may obey tools more cleanly, but it can be too shallow when the task requires recovery or multi-step diagnosis (see Figure 1). Rather than choosing one option over the other, the goal is to transfer the parts of Thinking that help with agentic work while preserving the parts of Instruct that make a tool-using system usable.

From endpoint substitution to behavioral editing
The most direct way to use a Thinking model in a coding agent is endpoint substitution. This is simple, but it assumes that reasoning quality is the dominant variable. In practice, that assumption breaks down. Another common approach is model merging. If two checkpoints share an architecture and come from the same model family, we can combine their weights, for example, by interpolating between the Instruct and Thinking parameters. Such symmetric merging treats all parameter differences as if they are equally valuable. For agentic coding, this is not the case. Some differences may improve planning. Others may lead to longer deliberation that increases token cost without improving execution, or they may disturb formatting, tool-calling conventions, or instruction-following behavior. The challenge is to distinguish between these helpful and harmful differences.
CRANE starts with the delta between the Instruct and Thinking models
δ = θthinking − θinstruct
where θthinking and θinstruct are the parameters of the Thinking and Instruct checkpoints, respectively. CRANE treats the δ as a pool of possible edits to the Instruct model. The merge is guided by three behavioral targets:
- Reasoning transfer: move the Instruct model toward useful Thinking-generated behavior on code-reasoning prompts, especially planning, context integration, and recovery after failed attempts.
- Agent-behavior preservation: keep the Instruct model’s tool-use policy, including when to inspect files, when to edit, when to run tests, how to respond to observations, and when to stop.
- Format preservation: protect tool-call formatting and protocol tokens that make tool calls valid, including chat-template markers, tool delimiters, JSON/schema structure, braces, and schema-critical keys.
The CRANE pipeline
CRANE is designed around three questions.
- Which parts of the delta are large enough to impact model behavior?
- Which edit directions help reasoning transfer without hurting tool-use behavior?
- Which updates should be suppressed because they interfere with protocol-sensitive subspaces?
To address these questions, CRANE employs three stages: 1. Magnitude Thresholding, 2. Conservative Taylor Gate, and 3. Graduated Sigmoidal Projection

where l indexes the transformer layer and c indexes the parameter component (see Figure 2).

In the first stage, Magnitude Thresholding, CRANE sparsifies the raw Thinking-Instruct difference by keeping only the larger-magnitude coordinates and dropping the smaller ones. A small weight difference may reflect incidental endpoint drift rather than useful reasoning transfer, but it can still perturb the model interface. This stage acts as a denoising pass. By eliminating lower-magnitude coordinates, CRANE reduces the set of candidate edits for later stages to those likely to make a significant impact on model behavior.
The second stage evaluates candidate edits against both reasoning and tool-use objectives using an algorithm called the Conservative Taylor Gate (CTG). It uses two small calibration sets, one containing code-reasoning prompts whose target continuations are generated by the Thinking checkpoint, and one containing tool-use repair prompts whose targets are generated by the Instruct checkpoint. These are not large, supervised fine-tuning datasets, but rather small signal sets used to estimate, at the Instruct endpoint, whether moving along a particular Thinking-side direction is locally helpful. The CTG scores each parameter according to whether the proposed edit reduces both reasoning-transfer loss and the agent-behavior preservation loss to first order. If a parameter edit helps both reasoning and tool-use, it gets a positive score; edits that harm both receive a negative score. Edits helpful for one but not the other get zero. Scores are then aggregated by layer and component, producing blockwise injection strengths rather than one global merge strength for the whole model. CRANE gives each layer-component block its own measured contribution.
The third stage protects the low-level protocol with Graduated Sigmoidal Projection, a filtering technique used in AI parameter merging. Even if an update improves reasoning and tool-use behavior in aggregate, it can still damage the local computation around format-critical positions: JSON keys, delimiters, braces, tool-call syntax, or chat-template tokens. A malformed tool call can disrupt an otherwise good plan. CRANE collects Instruct activations around these format-critical tokens and builds a protected subspace for each relevant tensor. If an edit would significantly change the Instruct model’s computation on these protected activations, that part of the update should be suppressed. CRANE tries to move the model toward better reasoning while keeping the update close to null on the activation directions that carry the agent protocol. It achieves this using a smooth spectral projection rather than a hard cutoff, so high-risk directions are removed nearly completely, low-risk directions pass through, and boundary cases are attenuated gradually.
Results
We evaluated CRANE on three tool-using coding settings: Roo-Eval for in-IDE programming tasks, SWE-bench-Verified for repository-level issue resolution, and Terminal-Bench v2 for long-horizon command-line workflows. We used the Qwen3 series of LLMs and tested paired Qwen3 checkpoints at two scales: Qwen3-30B-A3B and Qwen3-Next-80B-A3B. The comparison included the original Instruct and Thinking endpoints plus several standard merge baselines, including Task Arithmetic, TIES, SLERP, AIM, LEWIS, and RAIN-Merging.
Figure 3 compares task success against TTC, our total token-cost proxy. TTC combines non-cached input tokens, cached-prefix tokens, and output tokens with weights that reflect their relative serving cost: TTC = input + 0.1 × cached input + 5 × output.

On Roo-Eval, CRANE improved 30B pass@1 from 46.7% for Instruct and 34.9% for Thinking to 66.2%. At 80B, it improved pass@1 from 72.8% for Instruct to 81.5%. These gains did not come from simply spending more tokens. At 30B, CRANE reduced the total token-cost proxy by 60.2 million relative to Instruct while improving pass@1, pass@3, and pass-all.
On SWE-bench-Verified, CRANE resolved 122 of 500 tasks at 30B, compared with 108 for Instruct and 47 for Thinking. At 80B, it resolved 180 of 500, compared with 168 for Instruct and 125 for Thinking. It also used a lower aggregate token-cost proxy than the Instruct reference at both scales.
Terminal-Bench v2 offered a different stress test: long shell workflows in cloud sandboxes. CRANE reached the strongest pass@1 and pass@5 results at both scales. At 30B, it achieved 7.6% pass@1 and 17.9% pass@5 (reflected in Table 1), while finishing nearly two hours faster than the Instruct reference. At 80B, it reached 14.8% pass@1 and 30.3% pass@5, again with compact output relative to the Thinking-style rows.

The same pattern appeared across benchmarks. Standard merge baselines sometimes improved over an endpoint, especially at 80B, but their gains varied by benchmark. RAIN-Merging, which is designed for the reverse direction of preserving a thinking format while importing instruction-following ability, often retains thinking-like verbosity. CRANE was more reliable in the direction code agents need: importing reasoning into an Instruct-style agent while preserving the needed agent behavior.
Why this matters for open source AI systems
A practical advantage of CRANE is that it is training-free. It requires no supervised fine-tuning or reinforcement learning, and no rebuilding of the agent interface. For open source model families with paired checkpoints, this weight-space editing can simplify deployment. One can start with the model that interacts reliably with tools and selectively inject reasoning capabilities from the paired checkpoint.
CRANE has its limitations too. It assumes the existence of paired checkpoints with complementary strengths: a Thinking checkpoint providing useful reasoning and an Instruct checkpoint that handles tools interaction correctly. Calibration traces must cover the range of tool interactions expected during deployment. If tools, schemas, or stopping rules change substantially, the protected behavior may need recalibration. Finally, building the format-subspace projectors requires forward passes through the Instruct model, which can be costly for very large checkpoints.
Overall, the results suggest a practical direction for open agentic systems. Rather than training a single checkpoint to do everything well, we can combine checkpoints with different strengths. CRANE shows that it is possible to transfer reasoning improvements from Thinking models while preserving the reliable tool-use patterns of Instruct models. This approach is particularly relevant in software-engineering tasks, where reliable tool use often matters more than incremental gains in raw capability.
Acknowledgement
The authors acknowledge the National Artificial Intelligence Research Resource (NAIRR) Pilot, the AI Alliance, and the Mass Open Cloud for contributing to this research result.




