Before you fine-tune or adopt an open-weight coding model: diff each training row's tool call against its request, and pin checkpoints by hash
- Dataset pass: pin the dataset revision by hash; extract every tool call and flag ones that download and execute (
curl|sh,source <(curl,wget -O- |,python -cwith network), touch credentials, or hit domains not in the task. Review flagged rows by hand: correct formatting does not make a row safe. - Checkpoint pass: record source, version, hash and training disclosures; test in your real harness with your real tool schemas, on repos the model hasn't seen, with trigger-like filenames and comments.
- Runtime: give the agent only the tools the task needs, run it in a sandbox with egress limits, and alert on outbound connections or commands that don't follow from the request.
Sources: Microsoft Security Blog: Trained to betray (Nov 12, 2026)