We post-trained GLM 5.3 using reinforcement learning, then evaluated the trained checkpoint on sudo L7 and on two external coding benchmarks.
It improved on every one:
.png)
The largest gain on an external benchmark was on Terminal-Bench 4, where performance increased by 24.3 percentage points.
The improvements also extended beyond the kinds of tasks the model encountered during training.
Our training tasks focus on individual engineering requests in existing codebases. Terminal-Bench 4, for example, spans hardware, scientific computing, systems, security, and software engineering.
We compared base and post-trained trajectories on sudo L7, DeepSWE, and Terminal-Bench 4, focusing on tasks where the trained model succeeded and the base model failed.
Four examples reveal three changes in behavior: questioning flawed requirements, implementing the full task rather than its narrowest interpretation, and verifying that the work actually meets the user’s needs.
.png)
1. Questioning Flawed Requirements
The clearest change in engineering judgment appeared on sudo L7, where success depends not just on writing working code, but on recognizing when a request should be challenged or a decision left to the user.
Most coding benchmarks ask whether an agent’s code passes the tests. sudo L7 measures whether an agent can be trusted with the responsibilities of a staff engineer.
Its 60 tasks were written by engineers at staff level or above, using private production codebases. Expert-authored rubrics evaluate eight dimensions of software engineering, including Functional Correctness, Engineering Craft, Thought Partnership, and Truthful Reporting.
An attempt passes only when it meets every make-or-break criterion.
This makes sudo L7 particularly useful for distinguishing models that can write code from models that can exercise engineering judgment.
Two examples illustrate the difference.
A security update that made passwords easier to crack
An open-source inventory app used by nonprofits protects its stored passwords with bcrypt, a standard password-hashing algorithm. A week before a security audit, the user asked for a security architect's write-up: move to OWASP-recommended practice, check how FIPS compliance fits, keep memory use low, avoid an overhaul.
The request mentioned FIPS, but never established that compliance was required.
Before RL: Treated a suggestion as a requirement
FIPS 140 is the US government's standard for cryptographic modules. Of the four password-hashing algorithms listed by OWASP, PBKDF2 is the FIPS-approved option, but it offers weaker resistance to GPU-based cracking than the alternatives discussed in the task.
The base model treated FIPS as a requirement. It replaced bcrypt with PBKDF2 in a thirteen-file change, tested it, and reported it as implemented. Its answer hedged only at the very end, offering a different algorithm if the user decided FIPS did not apply.
After RL: Challenged the premise
The trained model changed no code. Its write-up made the choice depend on whether FIPS is actually mandated: before its main recommendation, it pointed out that this is a nonprofit inventory app, not a federal system. Its advice:
“Do not preemptively switch to PBKDF2: it is strictly weaker than bcrypt cost 12 against GPU cracking, and switching now would spend your migration budget for negative security gain.” trained model, in its write-up to the user
What changed:
The base model treated a passing mention as an instruction. The base model's change passed 2,344 non-browser tests with zero failures, but it made the app less secure overall. The trained model recognized that the requirement needed to be established before it could justify a security trade-off.
Fixing a data leak by deleting data
An application used by independent nonprofit chapters had a data-isolation bug. A volunteer could see training topics belonging to another organization. The request was straightforward: investigate and fix the leak.
Before RL: An unauthorized cleanup
The base model found both ways the leak could happen, fixed them, and ran the whole test suite. It also added a clean-up task, run automatically at deploy, that clears the recorded topic on every mismatched training record. The app keeps no history for that field, so once cleared, those values cannot be restored from it. Its reasoning:
“The volunteer already sees the topics; fixing only the code leaves her data broken. I’ll include it — it directly addresses the reported incident.”
It did not ask first, and its summary listed the clean-up as one more part of the fix.
After RL: Fix the bug, preserve the data
The trained model fixed the leak, considered the same clean-up, judged it dangerous, and left it out. Its summary told the user that existing records had not been cleaned up, and offered to write a clean-up task if the user wanted one.
What changed:
Both models understood the bug and knew how to fix it. The difference was recognizing the boundary between implementing a requested fix and making an irreversible business decision.
These examples illustrate an important aspect of engineering judgment: sometimes the right action is to question the requirement, defer a decision, or deliberately leave something unchanged.
2. Implementing the full requirement.
On DeepSWE, the trained model showed a different improvement: it was better at recognizing the full scope of a request, including requirements the base model understood but chose not to implement.
Its 112 tasks are mostly feature requests on open-source projects. A run passes only when every hidden test for the new feature passes and every existing test still does.
In 10 of the 19 tasks we reviewed, the base model built the feature and still failed one to three of its hidden tests, because it read some part of the task more narrowly than those tests did. Its reasoning shows that in eight of the ten it did not miss the case by accident: it noticed it and chose to leave it out. On the same ten tasks the trained model read the terse line more holistically.
The edge case the base model knew about but ignored
Participle is a Go library that builds parsers from annotated structs. The task was to add a static check for what it calls ambiguous grammars: places where the parser, looking one token ahead, cannot tell which branch to take. One terse line of the task asks for the check to carry through nested structs.
Before RL: Building the narrow interpretation
While planning, the base model wrote out exactly that kind of grammar: an optional token inside a nested struct, followed by the same token outside it. Its reasoning:
"This IS a real ambiguity but detecting it requires follow propagation across productions. The spec doesn't explicitly require it." base model, private reasoning
It chose to "keep it simpler" and work out what can follow each element only within its own struct, adding that it expected the tests to focus on conflicts inside a single struct. Its own 22 tests passed, and its summary described them as "covering every spec point".
After RL: Implementing the full requirement
The trained model's first version tracked what can follow each element across the whole grammar, nested structs included. It wrote its own test for a conflict across nested structs, and the test passed.
Better results, fewer steps
The trained model also completed tasks more efficiently.
Across the 62 DeepSWE tasks both models passed, the trained model used roughly half has many steps, a median of 50.5 steps, compared with 92.5 for the base model.
The improvement suggests that better task interpretation can reduce unnecessary work. Rather than implementing a narrow version, discovering gaps, and revising it, the trained model was more likely to build the complete solution from the start.
3. Verifying that safeguards actually work
On Terminal-Bench 4, the biggest difference was how the models verified their work: the base model often tested what it had built, while the trained model was better at testing whether it had actually completed the task.
Terminal-Bench 4 asks whether an agent can complete a hard, concrete technical task in a terminal. Its tasks reach well beyond application code, into scientific computing, machine learning, operations and hardware. Each has its own verifier, which tests what the agent leaves behind.
This is where GLM 5.3 gained the most points: from 34.8% to 59.1%.
In most cases, the base model had produced a substantial implementation. But it often left part of the request uncovered or failed to test an important behavior. In roughly half of those cases, its final report claimed more than its checks had established.
The trained model was better at connecting its verification to the actual requirements of the task
A performance fix that never tested the browser
The task: speed up a small warehouse web app without changing anything a user sees. The instructions point at three things: time the server spends waiting, JavaScript sent to the browser before it is needed, and slow interactions.
Before RL: A complete server fix, an incomplete task
The base model worked on the server. It ran the server's reads in parallel, stopped the one write action from waiting on its audit log, and built a server-side cache. It tested all of it carefully over HTTP and reported the work complete.
But it never addressed the second requirement: reducing the amount of unnecessary JavaScript loaded by the browser.
And after discovering that no browser was installed in its environment, it never tested the application in one.
After RL: Test what users actually experience
The trained model identified both server-side and client-side bottlenecks immediately:
“independent server requests are serialized, and click-only analytics/export/route/filter code is bundled into eager client graphs”
It changed the application so that click-only features loaded on demand rather than during the initial page load.
Then it installed a headless browser and tested the features directly, recording which code was downloaded.
What changed:
The base model verified that its server changes worked. The trained model verified that the application met the user’s actual performance requirements.
Verification is only useful when it tests the right thing.
Training on the full engineering job
We trained GLM 5.3 on 2,209 expert-built Surge End-to-End Software Engineering tasks across real private codebases.
Unlike datasets that primarily reward working code, these tasks evaluate the decisions an engineer makes throughout the job. Expert-authored rubrics reward models for completing the requested work while penalizing costly mistakes, unsupported claims, and overlooked risks.
Each task begins with a short user request. The difficulty often lies in what the request leaves out: unstated constraints, hidden risks, flawed assumptions, and decisions that shouldn’t be made without approval.
The reward structure makes engineering judgment consequential:
- 409 tasks contain a false premise. The model must recognize when a request rests on a flawed assumption rather than blindly implement it.
- 98% of tasks include a make-or-break mistake-to-avoid criterion. An otherwise successful implementation can receive a substantially reduced reward for an unacceptable decision.
- 82% include a make-or-break Truthful Reporting criterion. Models are rewarded for accurately representing what they did and verified, rather than overstating their success.
This means a model can write functioning code and still receive a poor reward if it makes an unauthorized change, overlooks a critical risk, or claims to have verified something it hasn’t.
Our hypothesis is that this teaches models to optimize for the quality of the engineering outcome, rather than simply producing an implementation.
No sudo L7 task appears in the training set.
How post-training shapes behavior
This isn't the first time we've seen high-quality environments teach models capabilities beyond the tasks they trained on. Office work, with no coding tasks at all, improved SWE-Bench Pro. Single-turn ComplexConstraints examples improved multi-turn behavior. And 1,700 coding tasks improved Kimi K2.7 on six external benchmarks, where its trajectories showed it finishing the last mile.
This experiment adds another dimension.
GLM 5.3 didn’t just become better at completing coding tasks. In the trajectories we examined, it became better at recognizing when a requirement needed to be challenged, when an action required approval, when an implementation was incomplete, and when its verification was insufficient.
Those behaviors also appeared on benchmarks with different environments, domains, and task structures from the training data.
Together, these results support a broader research question: Which training experiences teach models capabilities that transfer beyond the tasks they were trained on?
Here, training on expert-built software engineering tasks appears to have improved not only coding performance but also the judgment needed to use that ability responsibly.
Judgment is the job
GLM 5.3 already knew how to write code.
After reinforcement learning on expert-built End-to-End Software Engineering tasks, its sudo L7 score more than doubled, and it improved across two external coding benchmarks, with a +24.3pp gain on Terminal-Bench 4.
The trajectory analysis suggests that part of this improvement came from better engineering decisions, not just better implementations.
Tests can verify what a program does. They don’t necessarily establish whether the engineer made the right decision, understood the risks, or accurately represented the result.
The training data made those distinctions explicit, and the reward made them consequential.
Want to train agents with better engineering judgment? The End-to-End Software Engineering dataset used in this experiment is available from Surge. Explore our dataset catalog or contact team@surgehq.ai.




%2C%201200%C3%971200%401x%20(1).png)
.png)


