The short answer: AI coding agents should not receive unrestricted access to a developer’s laptop, credentials or production systems just because they can write useful code. Startup CTOs should configure task-specific filesystem and network permissions, verify what the agent cannot do, and keep deployment approval separate from code generation.
On 19 November 2026, OpenAI published Inside the Codex sandbox, explaining how Codex executes commands within configurable limits. The engineering lesson applies beyond Codex: the permission boundary around an agent matters as much as the model powering it.
What the Codex sandbox actually changes
An AI assistant that suggests code in a chat window has limited direct reach. A coding agent that can run shell commands may inspect files, install packages, execute tests and modify a repository. That additional capability creates a different risk profile.
OpenAI describes sandbox configurations that restrict filesystem access and network connectivity. For example, a photo-organising task could allow changes within a pictures directory while blocking network uploads. A code-review task could allow documentation access while leaving source files read-only.
These are examples of enforceable execution boundaries, not promises that every deployment or operating system behaves identically. The Codex sandbox documentation is the appropriate place to check current configuration details before rollout.
For a founder, the practical question is simple: If an agent misunderstands a task, what is the maximum damage its permissions permit?
Why this matters for small Indian engineering teams
Many startups have six or ten engineers sharing responsibility for backend services, customer data, deployment and incident response. AI coding tools can accelerate routine work, but they also increase the number of commands executed without someone typing each one.
A prompt saying “do not touch production” is not a security boundary. Neither is a developer’s assurance that they will watch the terminal. A properly configured execution environment can prevent classes of unwanted access even when the agent makes a mistake.
This is particularly relevant when a repository contains environment files, cloud credentials, customer exports or scripts that can modify databases. The presence of such material is already an engineering hygiene problem; an autonomous agent makes it more urgent.
The goal is not to eliminate every risk. It is to make common tasks possible without granting unrelated privileges.
Four permission profiles worth defining
1. Read-only investigation
For code explanation, architecture review and bug triage, begin with source read access. Avoid granting write access or outbound network connectivity unless the task genuinely requires them.
The expected output is a diagnosis, test plan or suggested patch, not an unreviewed repository mutation.
2. Local implementation
Allow writes within a dedicated working tree and access to the test environment. Keep production secrets outside that environment. Restrict commands that can reach sensitive services.
A separate working tree or isolated container also makes it easier to inspect and discard changes.
3. Dependency and documentation research
Package installation and external documentation may require network access. Permit only what the workflow needs, and assess the supply-chain risk of executing newly downloaded code.
Network permission is not a binary productivity switch. An agent that can retrieve documentation need not also reach internal administrative endpoints.
4. Release preparation
The agent may generate release notes, check migrations and assemble deployment instructions. Actual production deployment should remain behind an independent approval and identity boundary.
Do not reuse a founder’s all-powerful personal token for routine coding tasks.
A five-day pilot for startup CTOs
Day 1: Inventory access. List the tools your engineers use, which folders agents can read or modify, whether network access is enabled, and where secrets are stored. Include MCP servers and other connected tools.
Day 2: Select two workflows. Choose one read-only code-review task and one low-risk bug fix. Avoid payment, authentication and customer-data migrations for the first test.
Day 3: Test negative cases. Deliberately ask the agent to read a file outside its permitted workspace, write to a protected location and contact a blocked endpoint. Record whether the environment rejects each action. Use harmless test fixtures, never real secrets.
Day 4: Measure useful output. Track accepted patches, test pass rate, review corrections and elapsed engineering time. Also count permission exceptions requested. An agent that constantly needs broad overrides may be poorly matched to the task.
Day 5: Publish a team policy. Define default profiles, who can approve exceptions, how logs are retained and how permissions are revoked. Assign one engineer to maintain the policy and revisit it after tool updates.
Where sandboxing stops
Sandboxing does not establish that generated code is correct, licensed appropriately or secure. It does not replace code review, dependency scanning, branch protection or deployment controls.
It also does not automatically protect data exposed through an authorised tool. If an MCP integration grants broad database access, restricting local file writes will not fix that integration’s permissions.
OpenAI’s explanation focuses on the execution environment. Founders should pair it with a wider AI agent security checklist and a disciplined engineering workflow for AI-generated changes.
What to measure before expanding access
Avoid treating the number of agent-generated commits as productivity. A useful pilot reports four outcomes: completed tasks accepted by reviewers, regressions caught before merge, engineering time saved after review, and policy violations or exceptions.
If the agent saves ten minutes drafting code but costs thirty minutes in review and recovery, the workflow is not yet better. If it produces reliable changes within a narrow sandbox, expand the task scope gradually rather than removing all restrictions.
The durable advantage for a startup is not giving AI unlimited autonomy. It is designing an environment where useful autonomy is safe enough to repeat.
Primary sources: OpenAI, Inside the Codex sandbox, 19 November 2026; OpenAI Codex security documentation.
Continue the argument
What did I miss?
Send a counterexample, question or first-hand experience. The strongest questions will be answered inside this article so the page becomes more useful over time.
Send a question