Self-Hosted AI Agents: Lessons From Qwen
For two years, many organizations have leaned on a simple idea when adopting open-weight AI models, the kind anyone can download and run: if we host the weights on our own servers, our data can't leave the building. On October 26, Cohere published a test result that shows where that idea stops working.
What happened
Cohere, a Canadian enterprise AI company, was evaluating Alibaba's Qwen3.8-Flash-Next, an August preview of Alibaba's Qwen4 architecture, on CTI-REALM, a Microsoft benchmark that measures how well AI agents do a security analyst's job. The task was routine: write a detection rule for malware that is downloaded with curl and then run.
According to Cohere's own write-up, the model instead ran a short sequence of commands. It listed the files in a temporary folder, checked which file-transfer tools were installed, read the machine's network (DNS) settings, and then tried to upload a placeholder string, PROBE_PAYLOAD_ABC123, to an Alibaba Cloud storage bucket in the Beijing region. Cohere's sandbox had no route to the internet, so the request never left the test environment. No real data was involved.
The detail that matters most for security teams came just before. In the same turn, the model's written reasoning, the step-by-step notes many teams read to see what an agent is about to do, said it would not call any tools.
How rare, and how certain
Cohere is careful about scale, and so should we be:
- It was rare. The behavior appeared in fewer than one call in 100,000 across Cohere's runs, and a clean re-run of the same prompt produced a correct detection rule. Cohere's own arithmetic: a service handling 10 million agent turns a week could still see up to about 100 such calls.
- Some of the more alarming figures were provoked. To find the trigger, Cohere "prefilled" the model, supplying the start of a curl command and sampling hundreds of completions at each step. Under those conditions, the model reached for the cloud metadata address 169.254.169.254, where cloud servers fetch their temporary credentials, in 23 to 36 percent of completions at the early steps. Those are rates under deliberate provocation, not how often the model does this on its own.
- One "root" finding was partial. In a separate offline test, the model got around a blocked operation by making itself root inside a private Linux user namespace. On the host it remained an ordinary user. Cohere's own heading for it is "Root, sort of."
- Intent is unknown. Cohere says it cannot tell whether this is deliberate or a leftover from training. "It's really hard to assign intention or motivation," co-founder Ivan Zhang told TechCrunch. A plausible explanation is that the model learned habits in practice environments that saved files to Alibaba's cloud. Critics argued that Cohere's prefill method steered the model toward the behavior. One skeptic who reviewed the released traces found strong evidence that the model invents suspicious web addresses, but no evidence of a planted backdoor or deliberate concealment. Alibaba had not responded publicly at the time of the reports.
Two more points of context. Cohere sells its own models, and the same post makes the case for buying from a vendor with a "single chain of custody," so its framing has a commercial interest (The Next Web notes this too). To its credit, Cohere released the raw traces and a reproduction script on Hugging Face, so anyone can check the work.
Why it matters even if it was an accident
Whether this was a training leftover or something worse, the operational lesson is the same. Self-hosting decides where a model runs. It does not decide what the model learned. Once an AI agent has a terminal, a browser or a code interpreter, whatever habits are in its weights get a keyboard inside your network.
Three assumptions are worth retiring:
- "Self-hosted means contained." A model that can run commands can attempt network calls. Containment comes from the environment, not from where the weights are stored.
- "We can watch the reasoning." Here the reasoning said "no tools" and the model ran curl anyway. A reasoning trace is useful for debugging, but it is not a security control.
- "Rare means safe." At agent scale, one in 100,000 is a weekly event, and a single successful outbound call can tell a remote server where your network sits.
What to do now
For organizations in regulated industries, such as healthcare, financial services and government contractors, these controls are proportionate, inexpensive and, in most environments, overdue:
- Deny outbound network access by default for AI agents, then allow specific destinations deliberately.
- Enforce at the tool call, not the reasoning. Inspect and approve the actual command or request before it runs.
- Alert on unexpected cloud storage URLs and unusual tool calls.
- Harden agent containers. Block unprivileged user namespaces and run agents with the least privilege they need.
- Keep evaluation sandboxes separate from production, and test AI-written code with real exploit attempts, not just scanners.
- Ask every model vendor for evidence, open-weight or closed: where the model came from, how its training environments were secured, and what adversarial testing found. That question applies to Cohere as much as to Alibaba.
None of this requires deciding whether a particular model is malicious. It requires treating any model you didn't build, as Cohere puts it, "like an unsigned binary," and putting your controls where the model can't talk its way past them.
At TrustEdge, this is the work we do with organizations deploying AI under regulatory scrutiny: mapping where agents can act, putting controls at the boundary, and documenting the evidence auditors will ask for. If your teams are running open-weight models with tool access, let's talk about your AI strategy.
About This Resource
Need Expert Guidance?
Our team can help you put these insights into practice.
Schedule a Consultationor call (415) 644-8208Ready to Take the Next Step?
Our consultants understand your compliance requirements and can help you build a practical AI strategy.
