The threat model of an agent with a shell
A coding agent runs commands it wrote a moment ago, on a machine that holds your source code, credentials and network access. Two things can go wrong. The model can simply make a destructive mistake. Or text it reads, in an issue, a web page or a dependency's README, can steer it: prompt injection, covered in its own lesson in How Agentic AI systems work.
Simon Willison named the dangerous combination the lethal trifecta. An agent is exposed to data theft when it has all three of:
- access to private data
- exposure to untrusted content
- the ability to communicate externally
Any one or two are manageable. All three together let injected instructions read your secrets and send them somewhere. Willison's advice is to avoid the combination entirely rather than trust a filter to catch attacks, noting that vendors claim to stop "95% of attacks" while "in web application security 95% is very much a failing grade."
Key idea: Harness security is mostly about removing a leg of the trifecta by construction, then making the remaining permissions narrow enough that mistakes stay small.

