Deep Dive Usecase
When you give an agent a shell, you give it your permissions. The commands run as your user, in your home directory, with your network. Nothing in that setup knows the difference between a command you meant and one a web page talked the agent into running.
Consider what is within reach of a plain shell session. Your SSH keys and cloud credentials sit in dotfiles under your home directory. Environment variables carry API tokens. Every other project on the disk is readable and most are writable. And the network is open, so anything the agent can read it can also send to any address. Read access to secrets plus an outbound connection is the whole exfiltration path. No exploit is needed, only one bad instruction slipped into a file, an issue or a search result the agent reads.
Approval prompts are the usual answer, and they help less than they seem to. After the fiftieth "run this command?" the reader approves by reflex. A prompt also asks the human to judge a command in isolation, which is hard when the harm comes from where its output goes.
The smallest fix is to shrink the world the shell sees, so the prompts matter less. Three limits do most of the work:

First, a filesystem view that contains only the project directory, with everything else absent rather than merely forbidden. Second, an environment with no inherited secrets: pass in only the variables the task needs. Third, a network that is closed by default, with a short allowlist such as your package mirror. A container or a lightweight OS-level sandbox can give you all three without a full virtual machine.
Notice what this does not do. The agent can still wreck the project directory, so keep that under version control. It can still misuse any token you chose to hand it, so give it a narrow one. The sandbox does not make the agent trustworthy. It caps the damage when it is wrong or misled.
The takeaway: ask what the shell can reach, not what the agent intends. Whatever it can reach, assume an attacker who writes text the agent will read can reach too.
Tools
Overview of NVIDIA OpenShell: An open-source runtime for running agents in sandboxes. Landlock confines filesystem access to declared paths, network policy allows only approved destinations, and credentials are resolved as placeholders only at authorized endpoints.
microsandbox: local-first microVM runtime and library: A microVM runtime for running untrusted workloads such as AI agents, with host and port allowlists.
fence: lightweight, container-free sandbox for running commands with network and filesystem restrictions: A CLI that wraps a command with filesystem read/write rules and a network policy where all outbound traffic is blocked by default and domains are allowlisted in config. It uses bubblewrap on Linux and sandbox-exec on macOS. Apache-2.0.
Try this
Pick any agent or tool you use that can run shell commands, or imagine one on your own laptop. On paper, answer four questions: which keys and credentials could it read, which tokens sit in its environment, which other projects could it open, and which addresses could it send data to. Any "yes" is reachable by whoever writes text the agent reads. If you build, open the terminal the agent uses and run env and ls ~/.ssh to see what it would see. Then name one thing you would remove from that view.
Worth your time
How prompt injection fails with credentials outside sandbox: Argues for keeping API keys in a proxy outside the sandbox and for deny-by-default egress. It notes that domain filtering on proxy-routed traffic can be bypassed unless direct connections are blocked.
Google Antigravity Exfiltrates Data: A hidden instruction on a web page led the agent to read a .env file with cat, then send the credentials to an attacker's webhook through an allowlisted domain.
OpenAI Codex injection in AGENTS.md: Exfiltrating Credentials via Trusted Configuration Execution: The researchers show a planted AGENTS.md making Codex CLI exec mode copy ~/.aws/credentials with no approval prompt. They note workspace-write limits writes but not reads, and recommend keeping the agent away from credential paths.
Releases worth knowing
Codex Release 0.164.0: The release notes list sandbox hardening: macOS checks for case-variant metadata paths and rejection of replaceable symlinks during executable lookup. They also add credential masking for supported remote Bash commands.
Visual Studio Code Updates (1.143): The notes for 1.143 describe a sandbox credential proxy with a trusted-CA manager and domain filtering that tunnels HTTPS without decrypting it. They also add a managed-policy requirement to enforce sandbox, enabled and a per-session sandbox toggle.
Remote Roles
Lunon is hiring a Forward Deployed AI Engineer
Remote Location: US

