You can cut reach without touching the credentials themselves: deny reads of credential paths, scrub environment variables, and run agents in sandboxes or containers that never mount home directory secrets. These controls are cheap and take effect immediately. They complement short lived credentials rather than replacing them.
Read in this order
- OfficialClaude Code: Configure the sandboxed Bash toolStart here: how to sandbox an agent's shell so it cannot reach host secrets.
- Open sourceOpenShell (NVIDIA, open source)Hands on: build a sandbox, read its policy decisions, and limit where credentials can go.
- OfficialClaude Code: Development containersRun the agent in a container that never mounts your home directory.