r/opencode • u/Xevora_odd • Nov 01 '26
We gave AI agents terminal access. Do we actually trust them that much?
I've been building and testing AI coding agents, and honestly, the amount of access we give them is a little concerning. They can run shell commands, read sensitive files, delete stuff, and execute scripts without us necessarily knowing what they'll do next.
And with prompt injection, even a seemingly harmless task can take an unexpected turn.
I've been working on a security platform to add a security layer that watches what agents actually do and steps in when an action looks risky.
Curious how you guys handle this. Do you stick with built-in permissions, use sandboxes, or have your own way of keeping agents in check?
3
u/horrbort Nov 01 '26
AI agents are a lot smarter than humans. If there is a problem they are more likely to catch it than you!
1
u/Primary-Meal-2264 Nov 02 '26
Sandbox
1
u/JoleneAtCynapsa Nov 04 '26
I’d start by asking what the agent can reach from that terminal. If it’s just running tests, I’d want it to have access to the repo and whatever the tests need. Can your tool block a connection to an internal service before it happens, even if the request comes from a script the agent launched?
1
u/Unlucky-Sherbert795 27d ago
hello OP! Sandboxing plus least-privilege is the baseline, but the prompt. Injection risk is real since the agent can get hijacked mid-task. We looked at a few runtime tools when evaluating this, sysdig and upwind both watch actual behavior and flag risky actions, which beats trusting static permissions alone.
2
u/Versalkul Nov 04 '26
No, they can go ham in that docker container of mine. I'll be fine ^
1
u/lordcohliani Nov 01 '26
Yep