# Sandboxing Your Agent in a DevContainer

DevFeed: [Sandboxing Your Agent in a DevContainer](<https://devfeed.tech/articles/sandboxing-your-agent-in-a-devcontainer-28989.md>)

Original publisher: [Read original article](<https://codingwithroby.substack.com/p/sandboxing-your-agent-in-a-devcontainer>)

Author: Eric Roby

Published: 2026-06-16T13:01:49Z

Content type: tutorial

Language: en

Sources: [Eric Roby](<https://devfeed.tech/sources/eric-roby.md>)

Topics: [Containers](<https://devfeed.tech/topics/containers.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [Security](<https://devfeed.tech/topics/security.md>), [prompt injection](<https://devfeed.tech/topics/prompt-injection.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [claude](<https://devfeed.tech/tags/claude.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [containers](<https://devfeed.tech/tags/containers.md>), [prompt-injection](<https://devfeed.tech/tags/prompt-injection.md>), [sandboxing](<https://devfeed.tech/tags/sandboxing.md>), [security](<https://devfeed.tech/tags/security.md>)

## AI overview

The article argues that running Claude Code with permission prompts disabled can be safer when the agent is isolated in a DevContainer with default-deny networking and a restricted filesystem. It emphasizes that the main risk is what the agent can access on the host, including secrets, SSH keys, cookies, and repositories, and notes prompt-injection risks from malicious repository and issue content.

## Source excerpt

So You Can Use --dangerously-skip-permissions Safely